Skip to content

Commit

Permalink
Simplify doDeeperSearch
Browse files Browse the repository at this point in the history
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 #4888

Bench: 1427733
  • Loading branch information
FauziAkram authored and Disservin committed Dec 2, 2023
1 parent 757ae2f commit f17db46
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,9 +1188,8 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo
{
// 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;

Expand Down

0 comments on commit f17db46

Please sign in to comment.