From 92514fd3a2bfe66e6d6fa8b89ec69b826bbc31c8 Mon Sep 17 00:00:00 2001 From: Daniel Monroe Date: Thu, 10 Jul 2025 23:06:36 -0400 Subject: [PATCH] Simplify away a term in see pruning This change only sets the margin to 0 when depth <= 2 and margin <= 42 which never has a difference, thus non-functional Passed non-regression STC LLR: 3.51 (-2.94,2.94) <-1.75,0.25> Total: 306976 W: 78935 L: 78961 D: 149080 Ptnml(0-2): 630, 34097, 84067, 34057, 637 https://tests.stockfishchess.org/tests/view/68708015fa93cf16d3bb2782 closes https://github.com/official-stockfish/Stockfish/pull/6170 No functional change --- src/search.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 65f1a79a5..e698e2c7f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1047,8 +1047,8 @@ moves_loop: // When in check, search starts here } // SEE based pruning for captures and checks - int seeHist = std::clamp(captHist / 31, -137 * depth, 125 * depth); - if (!pos.see_ge(move, -158 * depth - seeHist)) + int margin = std::clamp(158 * depth + captHist / 31, 0, 283 * depth); + if (!pos.see_ge(move, -margin)) { bool mayStalemateTrap = depth > 2 && alpha < 0 && pos.non_pawn_material(us) == PieceValue[movedPiece]