]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Simplify kf definition in shelter_storm()
[stockfish] / src / search.cpp
index 2a7cde2b5fe848b7be3c778c263fc5d730da9a5b..4717a4d591d7ecfe8b32737b780b31b54510d42d 100644 (file)
@@ -663,7 +663,7 @@ namespace {
     // Step 8. Null move search with verification search (is omitted in PV nodes)
     if (   !PvNode
         && !ss->skipNullMove
-        &&  depth > ONE_PLY
+        &&  depth >= 2 * ONE_PLY
         &&  eval >= beta
         &&  abs(beta) < VALUE_MATE_IN_MAX_PLY
         &&  pos.non_pawn_material(pos.side_to_move()))
@@ -1230,6 +1230,7 @@ moves_loop: // When in check and at SpNode search starts from here
           && !givesCheck
           &&  move != ttMove
           &&  type_of(move) != PROMOTION
+          &&  futilityBase > -VALUE_KNOWN_WIN
           && !pos.is_passed_pawn_push(move))
       {
           futilityValue =  futilityBase