X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=1b98627e9bf1749e6e5ebb04370fdd09539c0016;hp=6aef6179d28737398587acae1fe08d46c6f8d217;hb=3835f49aa10af094642d94b1765183c8bffd561b;hpb=8e75384dd283d3af63c35b0ff36ba30809fcd173 diff --git a/src/search.cpp b/src/search.cpp index 6aef6179..1b98627e 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -499,14 +499,6 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[ << " nps " << nps(pos) << " time " << current_search_time() << endl; - // If we are pondering or in infinite search, we shouldn't print the - // best move before we are told to do so. - if (!AbortSearch && (PonderSearch || InfiniteSearch)) - wait_for_stop_or_ponderhit(); - - // Could be both MOVE_NONE when searching on a stalemate position - cout << "bestmove " << bestMove << " ponder " << ponderMove << endl; - if (UseLogFile) { if (dbg_show_mean) @@ -532,6 +524,14 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[ // This makes all the threads to go to sleep ThreadsMgr.set_active_threads(1); + // If we are pondering or in infinite search, we shouldn't print the + // best move before we are told to do so. + if (!AbortSearch && (PonderSearch || InfiniteSearch)) + wait_for_stop_or_ponderhit(); + + // Could be both MOVE_NONE when searching on a stalemate position + cout << "bestmove " << bestMove << " ponder " << ponderMove << endl; + return !Quit; }