]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
SEE Pruning Tweak (#2183)
[stockfish] / src / search.cpp
index a3ce4c2d3a49c2a257dc9a74a35e5e3f3a2aa7bf..f26ab959ba27ee829c9c07c9c4069b9b3a0a57ba 100644 (file)
@@ -958,7 +958,7 @@ moves_loop: // When in check, search starts from here
 
           if (   !captureOrPromotion
               && !givesCheck
-              && !pos.advanced_pawn_push(move))
+              && (!pos.advanced_pawn_push(move) || pos.non_pawn_material(~us) > BishopValueMg))
           {
               // Move count based pruning (~30 Elo)
               if (moveCountPruning)
@@ -984,7 +984,8 @@ moves_loop: // When in check, search starts from here
               if (!pos.see_ge(move, Value(-29 * lmrDepth * lmrDepth)))
                   continue;
           }
-          else if (!pos.see_ge(move, -PawnValueEg * (depth / ONE_PLY))) // (~20 Elo)
+          else if ((!givesCheck || !(pos.blockers_for_king(~us) & from_sq(move)))
+                  && !pos.see_ge(move, -PawnValueEg * (depth / ONE_PLY))) // (~20 Elo)
                   continue;
       }