X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=9a826d3724dc43bc7e6e8bff935f064ac18d5104;hp=97ad9912b6b38e21c890e462f30cca55efbacba5;hb=2ac35027d5900a641559fae7b22a994f8b4c2d72;hpb=3279655f12ff64603b62a99fe9d7e2c9ea6fb4ef diff --git a/src/search.cpp b/src/search.cpp index 97ad9912..9a826d37 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -331,7 +331,7 @@ void Thread::search() { if (idx > 0) { int i = (idx - 1) % 20; - if (((rootDepth / ONE_PLY + rootPos.game_ply() + SkipPhase[i]) / SkipSize[i]) % 2) + if (((rootDepth / ONE_PLY + SkipPhase[i]) / SkipSize[i]) % 2) continue; // Retry with an incremented rootDepth } @@ -1239,8 +1239,8 @@ moves_loop: // When in check, search starts from here && ttHit && tte->depth() >= ttDepth && ttValue != VALUE_NONE // Only in case of TT access race - && (ttValue >= beta ? (tte->bound() & BOUND_LOWER) - : (tte->bound() & BOUND_UPPER))) + && (ttValue >= beta ? (tte->bound() & BOUND_LOWER) + : (tte->bound() & BOUND_UPPER))) return ttValue; // Evaluate the position statically @@ -1258,7 +1258,7 @@ moves_loop: // When in check, search starts from here ss->staticEval = bestValue = evaluate(pos); // Can ttValue be used as a better position evaluation? - if ( ttValue != VALUE_NONE + if ( ttValue != VALUE_NONE && (tte->bound() & (ttValue > bestValue ? BOUND_LOWER : BOUND_UPPER))) bestValue = ttValue; }