X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=0cd490850cdbe57007053b4ed59bdc87131ddd72;hp=7188925c0e73c2f3e2fae8d5e2c1b77e5dea2374;hb=ffd6685f791f7e980cbada45ff66243c7b1aff76;hpb=b534176d4acc15ca5d7fdf3f44d1afb4e33c899a diff --git a/src/search.cpp b/src/search.cpp index 7188925c..0cd49085 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -320,7 +320,7 @@ namespace { while (++depth <= MAX_PLY && !Signals.stop && (!Limits.depth || depth <= Limits.depth)) { // Age out PV variability metric - BestMoveChanges *= 0.8; + BestMoveChanges *= 0.5; // Save the last iteration's scores before first PV line is searched and // all the move scores except the (new) PV are set to -VALUE_INFINITE. @@ -429,11 +429,10 @@ namespace { if (depth > 4 && depth < 50 && PVSize == 1) TimeMgr.pv_instability(BestMoveChanges); - // Stop the search if only one legal move is available or most - // of the available time has been used. We probably don't have - // enough time to search the first move at the next iteration anyway. + // Stop the search if only one legal move is available or all + // of the available time has been used. if ( RootMoves.size() == 1 - || IterationTime > (TimeMgr.available_time() * 62) / 100) + || IterationTime > TimeMgr.available_time() ) stop = true; if (stop) @@ -1628,9 +1627,8 @@ void check_time() { Time::point elapsed = Time::now() - SearchTime; bool stillAtFirstMove = Signals.firstRootMove && !Signals.failedLowAtRoot - && ( elapsed > TimeMgr.available_time() - || ( elapsed > (TimeMgr.available_time() * 62) / 100 - && elapsed > IterationTime * 1.4)); + && elapsed > TimeMgr.available_time() + && elapsed > IterationTime * 1.4; bool noMoreTime = elapsed > TimeMgr.maximum_time() - 2 * TimerThread::Resolution || stillAtFirstMove;