]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
History pruning
[stockfish] / src / search.cpp
index 33ab6b5fdc71618407a16267ab342556ed63ca98..b3dc2775175e4454913f247063294feddc1f14dc 100644 (file)
@@ -894,6 +894,13 @@ moves_loop: // When in check search starts from here
               && moveCount >= FutilityMoveCounts[improving][depth])
               continue;
 
+          // History Score Pruning
+          if (   depth <= 3 * ONE_PLY
+              && thisThread->History[pos.moved_piece(move)][to_sq(move)] < VALUE_ZERO
+              && CounterMovesHistory[pos.piece_on(prevMoveSq)][prevMoveSq]
+                                    [pos.moved_piece(move)][to_sq(move)] < VALUE_ZERO)
+              continue;
+
           predictedDepth = newDepth - reduction<PvNode>(improving, depth, moveCount);
 
           // Futility pruning: parent node