Skip to content

Commit dc243a3

Browse files
VoyagerOnesnicolet
authored andcommitted
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 #2252 Bench: 3242229
1 parent 9dc57b6 commit dc243a3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/search.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,13 @@ namespace {
11141114
+ (*contHist[3])[movedPiece][to_sq(move)]
11151115
- 4000;
11161116

1117+
// Reset statScore to zero if negative and most stats shows >= 0
1118+
if ( ss->statScore < 0
1119+
&& (*contHist[0])[movedPiece][to_sq(move)] >= 0
1120+
&& (*contHist[1])[movedPiece][to_sq(move)] >= 0
1121+
&& thisThread->mainHistory[us][from_to(move)] >= 0)
1122+
ss->statScore = 0;
1123+
11171124
// Decrease/increase reduction by comparing opponent's stat score (~10 Elo)
11181125
if (ss->statScore >= 0 && (ss-1)->statScore < 0)
11191126
r -= ONE_PLY;

0 commit comments

Comments
 (0)