From 65e2150501b87e6ce00fae4e3f056444f39462fd Mon Sep 17 00:00:00 2001 From: Michael Chaly Date: Sun, 7 May 2023 23:33:04 +0300 Subject: [PATCH] Refine deeper post-lmr searches This patch improves logic conditions for performing deeper searches after passed LMR. Instead of exceeding alpha by some margin now it requires to exceed the current best value - which may be lower than alpha (but never bigger since we update alpha with bestvalue if it exceeds alpha). Passed STC: https://tests.stockfishchess.org/tests/view/6455f78008858de8313775b6 LLR: 2.94 (-2.94,2.94) <0.00,2.00> Total: 209344 W: 55993 L: 55448 D: 97903 Ptnml(0-2): 507, 22798, 57526, 23325, 516 Passed LTC: https://tests.stockfishchess.org/tests/view/64572d46eb75932ccfebff97 LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 66288 W: 17867 L: 17514 D: 30907 Ptnml(0-2): 21, 6240, 20269, 6593, 21 closes https://github.com/official-stockfish/Stockfish/pull/4559 bench 3808503 --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 45fc1a7e..bc495c0e 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1201,7 +1201,7 @@ moves_loop: // When in check, search starts here { // Adjust full depth search based on LMR results - if result // was good enough search deeper, if it was bad enough search shallower - const bool doDeeperSearch = value > (alpha + 58 + 12 * (newDepth - d)); + const bool doDeeperSearch = value > (bestValue + 68 + 12 * (newDepth - d)); const bool doEvenDeeperSearch = value > alpha + 588 && ss->doubleExtensions <= 5; const bool doShallowerSearch = value < bestValue + newDepth; -- 2.39.2