mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Fix output of PV lines with invalid scores #2439
As reported on the forum it is possible, on very rare occasions, that we are trying to print a PV line with an invalid previousScore, although this line has a valid actual score. This patch fixes output of PV lines with invalid scores in a MultiPV search. This is a follow-up patch to8b15961
and makes the fix finally complete. The reason is the i <= pvIdx condition which probably is a leftover from the times there was a special root search function. This check is no longer needed today and prevents PV lines past the current one (current pvIdx) to be flagged as updated even though they do have a valid score.8b15961349
https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/PrnoDLvMvro No functional change.
This commit is contained in:
parent
20484ccdd5
commit
a6b5ba1b64
1 changed files with 1 additions and 1 deletions
|
@ -1741,7 +1741,7 @@ string UCI::pv(const Position& pos, Depth depth, Value alpha, Value beta) {
|
|||
|
||||
for (size_t i = 0; i < multiPV; ++i)
|
||||
{
|
||||
bool updated = (i <= pvIdx && rootMoves[i].score != -VALUE_INFINITE);
|
||||
bool updated = rootMoves[i].score != -VALUE_INFINITE;
|
||||
|
||||
if (depth == 1 && !updated)
|
||||
continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue