From 377a3a5269acc9a7961135e7f0c2232081047e38 Mon Sep 17 00:00:00 2001 From: Jost Triller Date: Wed, 30 Jul 2025 00:37:52 +0200 Subject: [PATCH] Depth dependent reduction threshold when full-depth re-search STC: https://tests.stockfishchess.org/tests/view/68894d577b562f5f7b73273b LLR: 2.98 (-2.94,2.94) <0.00,2.00> Total: 155072 W: 40651 L: 40150 D: 74271 Ptnml(0-2): 609, 18271, 39292, 18738, 626 LTC: https://tests.stockfishchess.org/tests/view/688c2705502b34dd5e71127a LLR: 2.95 (-2.94,2.94) <0.50,2.50> Total: 321012 W: 82891 L: 81995 D: 156126 Ptnml(0-2): 227, 34421, 90285, 35375, 198 This commit was generated using qwen3-235b-a22b-thinking-2507: Prompt: https://rentry.co/iqtaoht7 Reasoning/thinking: https://rentry.co/wm6t9hye closes https://github.com/official-stockfish/Stockfish/pull/6210 Bench: 2983938 --- AUTHORS | 1 + src/search.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 15614effd..6bf0745ad 100644 --- a/AUTHORS +++ b/AUTHORS @@ -125,6 +125,7 @@ Jonathan McDermid (jonathanmcdermid) Joost VandeVondele (vondele) Joseph Ellis (jhellis3) Joseph R. Prostko +Jost Triller (tsoj) Jörg Oster (joergoster) Julian Willemer (NightlyKing) jundery diff --git a/src/search.cpp b/src/search.cpp index 32ad708c8..b5e6e1be9 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1251,9 +1251,13 @@ moves_loop: // When in check, search starts here if (!ttData.move) r += 1139; + const int threshold1 = depth <= 4 ? 2000 : 3200; + const int threshold2 = depth <= 4 ? 3500 : 4600; + // Note that if expected reduction is high, we reduce search depth here value = -search(pos, ss + 1, -(alpha + 1), -alpha, - newDepth - (r > 3200) - (r > 4600 && newDepth > 2), !cutNode); + newDepth - (r > threshold1) - (r > threshold2 && newDepth > 2), + !cutNode); } // For PV nodes only, do a full PV search on the first move or after a fail high,