]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Prune dangerous moves at low depth
[stockfish] / src / search.cpp
index a58231d22fe79e85e21a62c3d86a27ec5ad994f2..9779aeab84e79680e99facd1f79c9904dc93a98f 100644 (file)
@@ -956,6 +956,16 @@ moves_loop: // When in check search starts from here
                   continue;
           }
       }
+      else if (    depth < 3 * ONE_PLY
+               && !inCheck
+               &&  bestValue > VALUE_MATED_IN_MAX_PLY
+               && !rootNode
+               && (  captureOrPromotion
+                   || givesCheck
+                   || pos.advanced_pawn_push(move))
+               && pos.see_sign(move) < VALUE_ZERO
+               )
+          continue;
 
       // Speculative prefetch as early as possible
       prefetch(TT.first_entry(pos.key_after(move)));