]> git.sesse.net Git - stockfish/commitdiff
Simplify doDeeperSearch
authorFauziAkram <fauzi.dabat@hotmail.com>
Sat, 2 Dec 2023 10:33:11 +0000 (11:33 +0100)
committerDisservin <disservin.social@gmail.com>
Sat, 2 Dec 2023 10:35:28 +0000 (11:35 +0100)
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

src/search.cpp

index 6580f520130f3d15b5be45edf3347289fcc568e7..0a12c85b721a484363c6a6ce7988ac834543bc9b 100644 (file)
@@ -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;