X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=11ba939a95153384267210921f8032ffbf5199cb;hp=e2cf76b81b7d97fc312de720bf8a41c88c068e6e;hb=4509eb1342fe282d08bd90340efaff4df5947a87;hpb=79232be02a03a5e2225b30f843e9597fd85951dc diff --git a/src/search.cpp b/src/search.cpp index e2cf76b8..11ba939a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -217,9 +217,12 @@ void Search::think() { RootPos.this_thread()->wait_for(Signals.stop); } - sync_cout << "bestmove " << UCI::format_move(RootMoves[0].pv[0], RootPos.is_chess960()) - << " ponder " << UCI::format_move(RootMoves[0].pv[1], RootPos.is_chess960()) - << sync_endl; + sync_cout << "bestmove " << UCI::format_move(RootMoves[0].pv[0], RootPos.is_chess960()); + + if (RootMoves[0].pv.size() > 1) + std::cout << " ponder " << UCI::format_move(RootMoves[0].pv[1], RootPos.is_chess960()); + + std::cout << sync_endl; } @@ -1533,7 +1536,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