Skip to content

Commit

Permalink
Fix early stop condition
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mcostalba committed Jan 8, 2014
1 parent f14cd1b commit 6a6fd0b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/search.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 6a6fd0b

Please sign in to comment.