]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
In non-PV IID don't call evaluate when in check
[stockfish] / src / search.cpp
index c0f087ff5a95fdb4174110efe86372de56e25ade..4481cfc727e436b8888825c94ec4bc99d261b21e 100644 (file)
@@ -1435,7 +1435,7 @@ namespace {
 
     // Go with internal iterative deepening if we don't have a TT move
     if (UseIIDAtNonPVNodes && ttMove == MOVE_NONE && depth >= 8*OnePly &&
-        evaluate(pos, ei, threadID) >= beta - IIDMargin)
+        !isCheck && evaluate(pos, ei, threadID) >= beta - IIDMargin)
     {
         search(pos, ss, beta, Min(depth/2, depth-2*OnePly), ply, false, threadID);
         ttMove = ss[ply].pv[ply];
@@ -2471,7 +2471,6 @@ namespace {
     assert(!pos.move_is_check(m));
     assert(!pos.move_is_capture_or_promotion(m));
     assert(!pos.move_is_passed_pawn_push(m));
-    assert(d >= OnePly);
 
     Square mfrom, mto, tfrom, tto;