Allow pruning advance pawn pushes if not near endgame
[stockfish] / src / search.cpp
index 1f706e631fee8a1efcf3edfb92efdaf87caa4fe0..31e8b0b661f46392453d097c39e137ba52bead57 100644 (file)
@@ -902,7 +902,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(WHITE) + pos.non_pawn_material(BLACK) >= 5000))
           {
               // Move count based pruning
               if (moveCountPruning)