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

Simplify time management

noProblemFound condition is never true.
This was verified by running 800 games 1+0 match in 1 CPU computer.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Joona Kiiski 2010-02-05 14:17:38 +02:00 committed by Marco Costalba
parent 6fe36d13de
commit d8e5b8c133

View file

@ -2771,15 +2771,8 @@ namespace {
&& !FailLow
&& t > MaxSearchTime + ExtraSearchTime;
bool noProblemFound = !FailHigh
&& !FailLow
&& !fail_high_ply_1()
&& !Problem
&& t > 6 * (MaxSearchTime + ExtraSearchTime);
bool noMoreTime = t > AbsoluteMaxSearchTime
|| stillAtFirstMove //FIXME: We are not checking any problem flags, BUG?
|| noProblemFound;
|| stillAtFirstMove;
if ( (Iteration >= 3 && UseTimeManagement && noMoreTime)
|| (ExactMaxTime && t >= ExactMaxTime)
@ -2801,15 +2794,8 @@ namespace {
&& !FailLow
&& t > MaxSearchTime + ExtraSearchTime;
bool noProblemFound = !FailHigh
&& !FailLow
&& !fail_high_ply_1()
&& !Problem
&& t > 6 * (MaxSearchTime + ExtraSearchTime);
bool noMoreTime = t > AbsoluteMaxSearchTime
|| stillAtFirstMove
|| noProblemFound;
|| stillAtFirstMove;
if (Iteration >= 3 && UseTimeManagement && (noMoreTime || StopOnPonderhit))
AbortSearch = true;