]> git.sesse.net Git - stockfish/commitdiff
Merge Lucas's "SEE pruning at PV nodes"
authorMarco Costalba <mcostalba@gmail.com>
Wed, 27 Feb 2013 07:10:24 +0000 (08:10 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 27 Feb 2013 07:14:00 +0000 (08:14 +0100)
bench: 4922272

src/search.cpp

index c256cfc01a9615bd6c5d11f6c6b21d30f2991500..b235a1e6384d98b56d86be13148334b43d43acb2 100644 (file)
@@ -857,16 +857,14 @@ split_point_start: // At split points actual search starts from here
       newDepth = depth - ONE_PLY + ext;
 
       // Step 13. Futility pruning (is omitted in PV nodes)
-      if (   !PvNode
-          && !captureOrPromotion
+      if (   !captureOrPromotion
           && !inCheck
           && !dangerous
-          &&  move != ttMove
-          && (bestValue > VALUE_MATED_IN_MAX_PLY || (   bestValue == -VALUE_INFINITE
-                                                     && alpha > VALUE_MATED_IN_MAX_PLY)))
+          &&  move != ttMove)
       {
           // Move count based pruning
-          if (   depth < 16 * ONE_PLY
+          if (   !PvNode
+              && depth < 16 * ONE_PLY
               && moveCount >= FutilityMoveCounts[depth]
               && (!threatMove || !refutes(pos, move, threatMove)))
           {
@@ -883,7 +881,7 @@ split_point_start: // At split points actual search starts from here
           futilityValue =  ss->staticEval + ss->evalMargin + futility_margin(predictedDepth, moveCount)
                          + Gain[pos.piece_moved(move)][to_sq(move)];
 
-          if (futilityValue < beta)
+          if (!PvNode && futilityValue < beta)
           {
               if (SpNode)
                   sp->mutex.lock();