]> git.sesse.net Git - stockfish/commitdiff
Remove explicit moveCount pruning
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 9 Nov 2019 05:56:18 +0000 (06:56 +0100)
committerStéphane Nicolet <cassio@free.fr>
Tue, 12 Nov 2019 00:27:06 +0000 (01:27 +0100)
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 https://github.com/official-stockfish/Stockfish/pull/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
```

src/search.cpp

index be296443f3d635c7e90bc9d4a7b0c711ed41e3b4..f9579ae0ab4fac374a3f695ba629e20552f6a3fd 100644 (file)
@@ -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
@@ -1024,10 +1024,6 @@ moves_loop: // When in check, search starts from here
               && !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);