]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix IIDMargin description
[stockfish] / src / search.cpp
index 4a108360a7cee9af7efcf5be646e097de072eae9..96720e215ed61347231601041d8bf074c98e38a5 100644 (file)
@@ -188,7 +188,7 @@ namespace {
   const Depth IIDDepth[2] = { 8 * OnePly /* non-PV */, 5 * OnePly /* PV */};
 
   // At Non-PV nodes we do an internal iterative deepening search
-  // when the static evaluation is at most IIDMargin below beta.
+  // when the static evaluation is bigger then beta - IIDMargin.
   const Value IIDMargin = Value(0x100);
 
   // Step 11. Decide the new search depth
@@ -1482,7 +1482,7 @@ namespace {
     if (bestValue >= beta)
     {
         // Store the score to avoid a future costly evaluation() call
-        if (!isCheck && !tte && ei.kingDanger[pos.side_to_move()] == 0)
+        if (!isCheck && !tte)
             TT.store(pos.get_key(), value_to_tt(bestValue, ply), VALUE_TYPE_LOWER, Depth(-127*OnePly), MOVE_NONE, ss[ply].eval, ei.kingDanger[pos.side_to_move()]);
 
         return bestValue;