]> git.sesse.net Git - stockfish/commitdiff
Change extra ply LMR condition to: cmh <= 0 && hist < 0
authorVoyagerOne <excelgeek@gmail.com>
Sun, 26 Apr 2015 19:12:25 +0000 (20:12 +0100)
committerJoona Kiiski <joona.kiiski@gmail.com>
Sun, 26 Apr 2015 19:12:25 +0000 (20:12 +0100)
Extra ply LMR condition is now cmh <= 0 && h < 0
Instead of cmh + h < 0

STC:
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 55210 W: 10812 L: 10557 D: 33841

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 13212 W: 2239 L: 2045 D: 8928

Bench: 8420865

Resolves #339

src/search.cpp

index 2149df2ba8fe340326ac45be06440f981e7d8826..636b1db404e4424721e42473108cb36869aaa21b 100644 (file)
@@ -960,9 +960,8 @@ moves_loop: // When in check and at SpNode search starts from here
           ss->reduction = reduction<PvNode>(improving, depth, moveCount);
 
           if (   (!PvNode && cutNode)
           ss->reduction = reduction<PvNode>(improving, depth, moveCount);
 
           if (   (!PvNode && cutNode)
-              || (  History[pos.piece_on(to_sq(move))][to_sq(move)]
-                  + CounterMovesHistory[pos.piece_on(prevMoveSq)][prevMoveSq]
-                                       [pos.piece_on(to_sq(move))][to_sq(move)] < VALUE_ZERO))
+              || (   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 += ONE_PLY;
 
           if (move == countermove)
               ss->reduction += ONE_PLY;
 
           if (move == countermove)