X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=f26ab959ba27ee829c9c07c9c4069b9b3a0a57ba;hp=a3ce4c2d3a49c2a257dc9a74a35e5e3f3a2aa7bf;hb=6ed81f09ffa513f0938c1a16fa4edd55e552c178;hpb=190f38a7c2a64f7e89f06871533d87ba7b287fdc diff --git a/src/search.cpp b/src/search.cpp index a3ce4c2d..f26ab959 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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; }