Do move-count pruning in probcut
authorVoyagerOne <excelgeek@gmail.com>
Sat, 3 Mar 2018 11:03:38 +0000 (12:03 +0100)
committerStéphane Nicolet <cassio@free.fr>
Sat, 3 Mar 2018 11:04:25 +0000 (12:04 +0100)
STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 4928 W: 1163 L: 1007 D: 2758

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 20368 W: 3441 L: 3238 D: 13689
http://tests.stockfishchess.org/tests/view/5a98bea40ebc590297cc8e5d

Bench: 6361568

src/search.cpp

index f6cf8de..8a50c3b 100644 (file)
@@ -757,10 +757,13 @@ namespace {
 
         Value rbeta = std::min(beta + 200, VALUE_INFINITE);
         MovePicker mp(pos, ttMove, rbeta - ss->staticEval, &thisThread->captureHistory);
-
-        while ((move = mp.next_move()) != MOVE_NONE)
+        int probCutCount = 0;
+        while (  (move = mp.next_move()) != MOVE_NONE
+               && probCutCount < depth / ONE_PLY - 3)
             if (pos.legal(move))
             {
+                probCutCount++;
+
                 ss->currentMove = move;
                 ss->contHistory = thisThread->contHistory[pos.moved_piece(move)][to_sq(move)].get();