1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 01:03: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 && !FailLow
&& t > MaxSearchTime + ExtraSearchTime; && t > MaxSearchTime + ExtraSearchTime;
bool noProblemFound = !FailHigh
&& !FailLow
&& !fail_high_ply_1()
&& !Problem
&& t > 6 * (MaxSearchTime + ExtraSearchTime);
bool noMoreTime = t > AbsoluteMaxSearchTime bool noMoreTime = t > AbsoluteMaxSearchTime
|| stillAtFirstMove //FIXME: We are not checking any problem flags, BUG? || stillAtFirstMove;
|| noProblemFound;
if ( (Iteration >= 3 && UseTimeManagement && noMoreTime) if ( (Iteration >= 3 && UseTimeManagement && noMoreTime)
|| (ExactMaxTime && t >= ExactMaxTime) || (ExactMaxTime && t >= ExactMaxTime)
@ -2801,15 +2794,8 @@ namespace {
&& !FailLow && !FailLow
&& t > MaxSearchTime + ExtraSearchTime; && t > MaxSearchTime + ExtraSearchTime;
bool noProblemFound = !FailHigh
&& !FailLow
&& !fail_high_ply_1()
&& !Problem
&& t > 6 * (MaxSearchTime + ExtraSearchTime);
bool noMoreTime = t > AbsoluteMaxSearchTime bool noMoreTime = t > AbsoluteMaxSearchTime
|| stillAtFirstMove || stillAtFirstMove;
|| noProblemFound;
if (Iteration >= 3 && UseTimeManagement && (noMoreTime || StopOnPonderhit)) if (Iteration >= 3 && UseTimeManagement && (noMoreTime || StopOnPonderhit))
AbortSearch = true; AbortSearch = true;