]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Razor at depth one, but do razoring only when not in check
[stockfish] / src / search.cpp
index 76db6d69217f4d53c3d007d808a0b1b952554111..40808c6adfc77797484fb196cb8c14310d16837e 100644 (file)
@@ -1447,8 +1447,9 @@ namespace {
     }
     // Null move search not allowed, try razoring
     else if (   !value_is_mate(beta)
     }
     // Null move search not allowed, try razoring
     else if (   !value_is_mate(beta)
+             && !isCheck
              && depth < RazorDepth
              && depth < RazorDepth
-             && staticValue < beta - (depth > OnePly ? NullMoveMargin + 16 * depth : 2*NullMoveMargin)
+             && staticValue < beta - (NullMoveMargin + 16 * depth)
              && ss[ply - 1].currentMove != MOVE_NULL
              && ttMove == MOVE_NONE
              && !pos.has_pawn_on_7th(pos.side_to_move()))
              && ss[ply - 1].currentMove != MOVE_NULL
              && ttMove == MOVE_NONE
              && !pos.has_pawn_on_7th(pos.side_to_move()))