]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Do IID also when we already have a ttMove
[stockfish] / src / search.cpp
index a76ff2ca117f394daf27deb6c306deee8e6005ad..ba0a4f0c596386b623f52ee8b15ddcf9bbaef22b 100644 (file)
@@ -1207,8 +1207,8 @@ namespace {
     }
 
     // Step 9. Internal iterative deepening
     }
 
     // Step 9. Internal iterative deepening
-    if (   depth >= IIDDepth[PvNode]
-        && ttMove == MOVE_NONE
+    if (    depth >= IIDDepth[PvNode]
+        && (ttMove == MOVE_NONE || (PvNode && tte->depth() <= depth - 4 * OnePly))
         && (PvNode || (!isCheck && ss[ply].eval >= beta - IIDMargin)))
     {
         Depth d = (PvNode ? depth - 2 * OnePly : depth / 2);
         && (PvNode || (!isCheck && ss[ply].eval >= beta - IIDMargin)))
     {
         Depth d = (PvNode ? depth - 2 * OnePly : depth / 2);