From 7a7c033a86be1c14817cfa1de2c85937585526b6 Mon Sep 17 00:00:00 2001 From: FauziAkram Date: Fri, 3 Oct 2025 01:39:39 +0300 Subject: [PATCH] Tweak Correction History Bonus Asymmetrically Refine the correction history update by applying an asymmetric bonus based on the type of evaluation error. It differentiates between negative corrections and positive corrections. Passed STC: LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 165184 W: 43314 L: 42807 D: 79063 Ptnml(0-2): 551, 19391, 42261, 19778, 611 https://tests.stockfishchess.org/tests/view/68cae49902c43c969fe7f008 Passed LTC: LLR: 2.95 (-2.94,2.94) <0.50,2.50> Total: 243234 W: 62765 L: 62029 D: 118440 Ptnml(0-2): 163, 25996, 68551, 26756, 151 https://tests.stockfishchess.org/tests/view/68d1c50dfa806e2e8393aa1f closes https://github.com/official-stockfish/Stockfish/pull/6338 Bench: 2746404 --- src/search.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 04c04b5be..64f8ea189 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1449,9 +1449,11 @@ moves_loop: // When in check, search starts here && ((bestValue < ss->staticEval && bestValue < beta) // negative correction & no fail high || (bestValue > ss->staticEval && bestMove))) // positive correction & no fail low { - auto bonus = std::clamp(int(bestValue - ss->staticEval) * depth / 8, - -CORRECTION_HISTORY_LIMIT / 4, CORRECTION_HISTORY_LIMIT / 4); - update_correction_history(pos, ss, *this, bonus); + auto bonus = + std::clamp(int(bestValue - ss->staticEval) * depth / (8 + (bestValue > ss->staticEval)), + -CORRECTION_HISTORY_LIMIT / 4, CORRECTION_HISTORY_LIMIT / 4); + update_correction_history(pos, ss, *this, + (1088 - 180 * (bestValue > ss->staticEval)) * bonus / 1024); } assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);