]> git.sesse.net Git - stockfish/commitdiff
LMR Tweak
authorVoyagerOne <excelgeek@gmail.com>
Sun, 21 Jul 2019 15:25:58 +0000 (11:25 -0400)
committerStéphane Nicolet <cassio@free.fr>
Thu, 25 Jul 2019 06:46:26 +0000 (08:46 +0200)
Reset statScore to zero if negative and most stats shows >= 0

STC:
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 23097 W: 5242 L: 4963 D: 12892
http://tests.stockfishchess.org/tests/view/5d31dd650ebc5925cf0e598f

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 227597 W: 39013 L: 38191 D: 150393
http://tests.stockfishchess.org/tests/view/5d31fcdf0ebc5925cf0e5c13

Closes https://github.com/official-stockfish/Stockfish/pull/2252

Bench: 3242229

src/search.cpp

index 1fc0bf1e6c6455ea470ad7047d80c8a5d2e85ef5..f50fdf8803fbaa7c58981058e490ff5dac8ecc9d 100644 (file)
@@ -1114,6 +1114,13 @@ moves_loop: // When in check, search starts from here
                              + (*contHist[3])[movedPiece][to_sq(move)]
                              - 4000;
 
+              // Reset statScore to zero if negative and most stats shows >= 0
+              if (    ss->statScore < 0
+                  && (*contHist[0])[movedPiece][to_sq(move)] >= 0
+                  && (*contHist[1])[movedPiece][to_sq(move)] >= 0
+                  && thisThread->mainHistory[us][from_to(move)] >= 0)
+                  ss->statScore = 0;
+
               // Decrease/increase reduction by comparing opponent's stat score (~10 Elo)
               if (ss->statScore >= 0 && (ss-1)->statScore < 0)
                   r -= ONE_PLY;