Skip to content

Commit

Permalink
Remove explicit moveCount pruning
Browse files Browse the repository at this point in the history
The removed lines approximately duplicate equivalent logic in the movePicker.
Adjust the futility_move_count to componsate for some difference
(the movePicker prunes one iteration of the move loop later).

Passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 8114 W: 1810 L: 1663 D: 4641
http://tests.stockfishchess.org/tests/view/5dc6afe60ebc5902562bd318

Passed LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 89956 W: 14473 L: 14460 D: 61023
http://tests.stockfishchess.org/tests/view/5dc6bdcf0ebc5902562bd3c0

Closes official-stockfish#2407

Bench: 4256440

---------------------

How to continue from there?

It would be interesting to see if we can extract some Elo gain
from the new futility_move_count formula, for instance by somehow
incorporating the final -1 in the 5 constant, or adding a linear
term to the quadratics...

```
   futility_move_count = (5 + depth * depth) * (1 + improving) / 2 - 1
```
  • Loading branch information
vondele authored and snicolet committed Nov 12, 2019
1 parent 9b8b259 commit 44b6697
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ namespace {
}

constexpr int futility_move_count(bool improving, Depth depth) {
return (5 + depth * depth) * (1 + improving) / 2;
return (5 + depth * depth) * (1 + improving) / 2 - 1;
}

// History and stats update bonus, based on depth
Expand Down Expand Up @@ -1024,10 +1024,6 @@ namespace {
&& !givesCheck
&& (!pos.advanced_pawn_push(move) || pos.non_pawn_material(~us) > BishopValueMg))
{
// Move count based pruning
if (moveCountPruning)
continue;

// Reduced depth of the next LMR search
int lmrDepth = std::max(newDepth - reduction(improving, depth, moveCount), 0);

Expand Down

0 comments on commit 44b6697

Please sign in to comment.