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
+ (*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;