From 254b6d5e85d50b057f47a99b2515606a2626813c Mon Sep 17 00:00:00 2001 From: Daniel Monroe Date: Sat, 31 May 2025 11:04:42 -0700 Subject: [PATCH] Simplify corrections in extension margins Passed simplification STC LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 96192 W: 25002 L: 24852 D: 46338 Ptnml(0-2): 242, 10868, 25716, 11038, 232 https://tests.stockfishchess.org/tests/view/683b44cb6ec7634154f9d6ac Passed simplification LTC LLR: 2.96 (-2.94,2.94) <-1.75,0.25> Total: 83334 W: 21473 L: 21317 D: 40544 Ptnml(0-2): 37, 8877, 23674, 9051, 28 https://tests.stockfishchess.org/tests/view/683b79786ec7634154f9d75a closes https://github.com/official-stockfish/Stockfish/pull/6117 Bench: 2294814 --- src/search.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index e3cb1cdb..25c173f2 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1131,13 +1131,12 @@ moves_loop: // When in check, search starts here if (value < singularBeta) { - int corrValAdj1 = std::abs(correctionValue) / 248400; - int corrValAdj2 = std::abs(correctionValue) / 249757; - int doubleMargin = -4 + 244 * PvNode - 206 * !ttCapture - corrValAdj1 + int corrValAdj = std::abs(correctionValue) / 248400; + int doubleMargin = -4 + 244 * PvNode - 206 * !ttCapture - corrValAdj - 997 * ttMoveHistory / 131072 - (ss->ply > thisThread->rootDepth) * 47; - int tripleMargin = 84 + 269 * PvNode - 253 * !ttCapture + 91 * ss->ttPv - - corrValAdj2 - (ss->ply * 2 > thisThread->rootDepth * 3) * 54; + int tripleMargin = 84 + 269 * PvNode - 253 * !ttCapture + 91 * ss->ttPv - corrValAdj + - (ss->ply * 2 > thisThread->rootDepth * 3) * 54; extension = 1 + (value < singularBeta - doubleMargin) + (value < singularBeta - tripleMargin);