From 7f97ba775ece910402108d7a7b11ce645185d300 Mon Sep 17 00:00:00 2001 From: FauziAkram Date: Sat, 4 Nov 2023 17:19:08 +0300 Subject: [PATCH] Tweaking the futility pruning formula Huge credit goes also to candirufish, as the idea was first tried by him, and then tuned by me at multiple phases. Tweaking the futility pruning formula to be a bit more selective about when pruning is applied. Adjust the value added to the static eval based on the bestValue relative to ss->staticEval. If bestValue is significantly lower, we add a larger value. Passed STC: LLR: 2.98 (-2.94,2.94) <0.00,2.00> Total: 37120 W: 9590 L: 9266 D: 18264 Ptnml(0-2): 130, 4301, 9385, 4603, 141 https://tests.stockfishchess.org/tests/view/6544cf90136acbc573523247 Passed LTC: LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 49632 W: 12381 L: 12033 D: 25218 Ptnml(0-2): 30, 5429, 13549, 5779, 29 https://tests.stockfishchess.org/tests/view/65453bc1136acbc573523a3c closes https://github.com/official-stockfish/Stockfish/pull/4861 bench: 1107118 --- src/search.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 55d11003..27f0f987 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1009,7 +1009,10 @@ moves_loop: // When in check, search starts here lmrDepth = std::max(lmrDepth, -1); // Futility pruning: parent node (~13 Elo) - if (!ss->inCheck && lmrDepth < 13 && ss->staticEval + 77 + 124 * lmrDepth <= alpha) + if (!ss->inCheck && lmrDepth < 13 + && ss->staticEval + (bestValue < ss->staticEval - 62 ? 123 : 77) + + 127 * lmrDepth + <= alpha) continue; lmrDepth = std::max(lmrDepth, 0); -- 2.39.2