Fix pondering
authorGary Linscott <glinscott@gmail.com>
Mon, 24 Nov 2014 00:49:53 +0000 (08:49 +0800)
committerGary Linscott <glinscott@gmail.com>
Mon, 24 Nov 2014 00:50:36 +0000 (08:50 +0800)
The UCI specification states that an engine can never exit the search
while pondering.

No functional change.

Resolves #118

src/search.cpp

index e2cf76b81b7d97fc312de720bf8a41c88c068e6e..9f2786230477737160147feba907bb5fed0ed02b 100644 (file)
@@ -1533,7 +1533,11 @@ void check_time() {
       dbg_print();
   }
 
-  if (Limits.use_time_management() && !Limits.ponder)
+  // An engine may not stop pondering until told so by the GUI
+  if (Limits.ponder)
+      return;
+
+  if (Limits.use_time_management())
   {
       bool stillAtFirstMove =    Signals.firstRootMove
                              && !Signals.failedLowAtRoot