LMR Tweak: Decrease reduction if cmh>0 && history>0.
authorVoyagerOne <excelgeek@gmail.com>
Sat, 27 Jun 2015 08:41:17 +0000 (09:41 +0100)
committerJoona Kiiski <joona.kiiski@gmail.com>
Sat, 27 Jun 2015 08:45:59 +0000 (09:45 +0100)
STC:
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 9627 W: 1879 L: 1748 D: 6000

LTC:
LLR: 2.97 (-2.94,2.94) [0.00,6.00]
Total: 21543 W: 3433 L: 3234 D: 14876

Bench: 8646407

Resolves #370 #371

src/search.cpp

index cbc5038..727990d 100644 (file)
@@ -959,7 +959,10 @@ moves_loop: // When in check and at SpNode search starts from here
                                         [pos.piece_on(to_sq(move))][to_sq(move)] <= VALUE_ZERO))
               ss->reduction += ONE_PLY;
 
-          if (move == countermove)
+          if (    move == countermove
+              || (   History[pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO
+                  && CounterMovesHistory[pos.piece_on(prevMoveSq)][prevMoveSq]
+                                        [pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO))
               ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY);
 
           // Decrease reduction for moves that escape a capture