mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Improve compatibility with Shredder Classic GUI
This commit fixes two issues: 1) Don't print PVs after the search has been interrupted This solves the "mate 0 upperbound" scores that sometimes creep up when a multi-PV analysis gets interrupted with the `stop` command. 2) Print multipv before score Shredder Classic fails to identify the main PV (the one with multipv 1) if `score` comes first. This leads to an eval graph that doesn't reflect the scores actually reported by Stockfish when doing a multiPV analysis. No functional change Closes #76
This commit is contained in:
parent
5ab55827b8
commit
f1359845de
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -1326,11 +1328,11 @@ moves_loop: // When in check and at SpNode search starts from here
|
|||
|
||||
ss << "info depth " << d
|
||||
<< " seldepth " << selDepth
|
||||
<< " 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)
|
||||
|
|
Loading…
Add table
Reference in a new issue