Simplify time management
authorJoona Kiiski <joona.kiiski@gmail.com>
Fri, 5 Feb 2010 12:17:38 +0000 (14:17 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 5 Feb 2010 14:20:47 +0000 (15:20 +0100)
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>
src/search.cpp

index ff791b8ea903e85649c99ee651661f26e31f38f0..6c28b52f3fad315bce9d866a926da6d5396d46f7 100644 (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;