From: VoyagerOne Date: Sun, 21 Jul 2019 15:25:58 +0000 (-0400) Subject: LMR Tweak X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=dc243a3c880d0a736fb93848cf56e3221e07f8a3 LMR Tweak 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 --- diff --git a/src/search.cpp b/src/search.cpp index 1fc0bf1e..f50fdf88 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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;