From a43f12ef08a14c5ab5303d223e7ae4e77754e982 Mon Sep 17 00:00:00 2001 From: Daniel Monroe Date: Sat, 14 Jun 2025 17:52:59 -0700 Subject: [PATCH] Simplify away constants in statscore Passed simplification STC LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 317280 W: 81589 L: 81678 D: 154013 Ptnml(0-2): 799, 37651, 81847, 37526, 817 https://tests.stockfishchess.org/tests/view/684e197a703522d4f129c9f0 Passed simplification LTC LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 174816 W: 44656 L: 44593 D: 85567 Ptnml(0-2): 83, 19064, 49058, 19113, 90 https://tests.stockfishchess.org/tests/view/6858aa54a596a06817bb924f closes https://github.com/official-stockfish/Stockfish/pull/6150 bench: 2508140 --- src/search.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 8decb5d1e..cfd3583bc 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1192,7 +1192,7 @@ moves_loop: // When in check, search starts here // These reduction adjustments have no proven non-linear scaling - r += 316; // Base reduction offset to compensate for other tweaks + r += 650; // Base reduction offset to compensate for other tweaks r -= moveCount * 66; r -= std::abs(correctionValue) / 28047; @@ -1217,12 +1217,11 @@ moves_loop: // When in check, search starts here if (capture) ss->statScore = 826 * int(PieceValue[pos.captured_piece()]) / 128 - + thisThread->captureHistory[movedPiece][move.to_sq()][type_of(pos.captured_piece())] - - 5030; + + thisThread->captureHistory[movedPiece][move.to_sq()][type_of(pos.captured_piece())]; else ss->statScore = 2 * thisThread->mainHistory[us][move.from_to()] + (*contHist[0])[movedPiece][move.to_sq()] - + (*contHist[1])[movedPiece][move.to_sq()] - 3206; + + (*contHist[1])[movedPiece][move.to_sq()]; // Decrease/increase reduction for moves with a good/bad history r -= ss->statScore * 826 / 8192;