From: FauziAkram Date: Sat, 2 Dec 2023 10:33:11 +0000 (+0100) Subject: Simplify doDeeperSearch X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=f17db4641e0ec3a3d633cff6abc83e980a04ac4c Simplify doDeeperSearch Removing dependence on d simplifies the doDeeperSearch formula and eliminates a variable that is not necessary in this context. Passed STC: https://tests.stockfishchess.org/tests/view/65647980136acbc57354c9f6 LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 37440 W: 9558 L: 9334 D: 18548 Ptnml(0-2): 127, 4439, 9375, 4641, 138 Passed LTC: https://tests.stockfishchess.org/tests/view/6564c3f0136acbc57354d126 LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 113946 W: 27993 L: 27864 D: 58089 Ptnml(0-2): 67, 12975, 30783, 13058, 90 closes https://github.com/official-stockfish/Stockfish/pull/4888 Bench: 1427733 --- diff --git a/src/search.cpp b/src/search.cpp index 6580f520..0a12c85b 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1188,9 +1188,8 @@ moves_loop: // When in check, search starts here { // Adjust full-depth search based on LMR results - if the result // was good enough search deeper, if it was bad enough search shallower. - const bool doDeeperSearch = - value > (bestValue + 51 + 10 * (newDepth - d)); // (~1 Elo) - const bool doShallowerSearch = value < bestValue + newDepth; // (~2 Elo) + const bool doDeeperSearch = value > (bestValue + 50 + 2 * newDepth); // (~1 Elo) + const bool doShallowerSearch = value < bestValue + newDepth; // (~2 Elo) newDepth += doDeeperSearch - doShallowerSearch;