From: Marco Costalba Date: Wed, 8 Jan 2014 21:58:25 +0000 (+0900) Subject: Fix early stop condition X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=6a6fd0b5f51046d09ee1f2377ef14c6aad611b18 Fix early stop condition While editing original Uri's messy patch I have incorrectly simplified the logic condition. Here is the correct original version, as it was tested. bench: 8502826 --- diff --git a/src/search.cpp b/src/search.cpp index be82568a..a08256d7 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1612,8 +1612,9 @@ void check_time() { Time::point elapsed = Time::now() - SearchTime; bool stillAtFirstMove = Signals.firstRootMove && !Signals.failedLowAtRoot - && elapsed > (TimeMgr.available_time() * 62) / 100 - && elapsed > IterationTime * 1.4; + && ( elapsed > TimeMgr.available_time() + || ( elapsed > (TimeMgr.available_time() * 62) / 100 + && elapsed > IterationTime * 1.4)); bool noMoreTime = elapsed > TimeMgr.maximum_time() - 2 * TimerThread::Resolution || stillAtFirstMove;