1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

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
This commit is contained in:
Marco Costalba 2014-01-09 06:58:25 +09:00
parent f14cd1bb89
commit 6a6fd0b5f5

View file

@ -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;