]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Use zero null move margin when depth < 4 * OnePly
[stockfish] / src / search.cpp
index dece7fd4958217523da01dbdae0dc0e5196fc971..3e74ddc2168af68d20774a46402fcbdadc1748ec 100644 (file)
@@ -1334,7 +1334,7 @@ namespace {
         && !isCheck
         && !value_is_mate(beta)
         &&  ok_to_do_nullmove(pos)
-        &&  staticValue >= beta - NullMoveMargin)
+        &&  staticValue >= beta - (depth >= 4 * OnePly ? NullMoveMargin : 0))
     {
         ss[ply].currentMove = MOVE_NULL;