X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=ea1ed57ab0846068d1d9d182c4115837a3b15e98;hp=a871626af4134cd07c6de8ed988a35d8e5a8cc0f;hb=d9caede3249698440b7579e31d92aaa9984a128b;hpb=aa60c80adec4d537c5dbd8d60b3d08ce0a807d9a diff --git a/src/search.cpp b/src/search.cpp index a871626a..ea1ed57a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -167,7 +167,7 @@ uint64_t Search::perft(Position& pos, Depth depth) { pos.undo_move(*it); } if (Root) - sync_cout << UCI::move_to_uci(*it, pos.is_chess960()) << ": " << cnt << sync_endl; + sync_cout << UCI::format_move(*it, pos.is_chess960()) << ": " << cnt << sync_endl; } return nodes; } @@ -191,7 +191,7 @@ void Search::think() { { RootMoves.push_back(MOVE_NONE); sync_cout << "info depth 0 score " - << UCI::score_to_uci(RootPos.checkers() ? -VALUE_MATE : VALUE_DRAW) + << UCI::format_value(RootPos.checkers() ? -VALUE_MATE : VALUE_DRAW) << sync_endl; goto finalize; @@ -226,8 +226,8 @@ finalize: } // Best move could be MOVE_NONE when searching on a stalemate position - sync_cout << "bestmove " << UCI::move_to_uci(RootMoves[0].pv[0], RootPos.is_chess960()) - << " ponder " << UCI::move_to_uci(RootMoves[0].pv[1], RootPos.is_chess960()) + 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; } @@ -341,7 +341,9 @@ namespace { // Sort the PV lines searched so far and update the GUI std::stable_sort(RootMoves.begin(), RootMoves.begin() + PVIdx + 1); - if (PVIdx + 1 == std::min(multiPV, RootMoves.size()) || Time::now() - SearchTime > 3000) + if ( !Signals.stop + && ( PVIdx + 1 == std::min(multiPV, RootMoves.size()) + || Time::now() - SearchTime > 3000)) sync_cout << uci_pv(pos, depth, alpha, beta) << sync_endl; } @@ -694,7 +696,7 @@ moves_loop: // When in check and at SpNode search starts from here if (thisThread == Threads.main() && Time::now() - SearchTime > 3000) sync_cout << "info depth " << depth - << " currmove " << UCI::move_to_uci(move, pos.is_chess960()) + << " currmove " << UCI::format_move(move, pos.is_chess960()) << " currmovenumber " << moveCount + PVIdx << sync_endl; } @@ -1326,15 +1328,15 @@ moves_loop: // When in check and at SpNode search starts from here ss << "info depth " << d << " seldepth " << selDepth - << " score " << (i == PVIdx ? UCI::score_to_uci(v, alpha, beta) : UCI::score_to_uci(v)) + << " multipv " << i + 1 + << " score " << (i == PVIdx ? UCI::format_value(v, alpha, beta) : UCI::format_value(v)) << " nodes " << pos.nodes_searched() << " nps " << pos.nodes_searched() * 1000 / elapsed << " time " << elapsed - << " multipv " << i + 1 << " pv"; for (size_t j = 0; RootMoves[i].pv[j] != MOVE_NONE; ++j) - ss << " " << UCI::move_to_uci(RootMoves[i].pv[j], pos.is_chess960()); + ss << " " << UCI::format_move(RootMoves[i].pv[j], pos.is_chess960()); } return ss.str();