Skip to content

Commit

Permalink
Fix for Nagisa's issue, maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
rooklift committed Feb 8, 2024
1 parent 669fbb1 commit 8412d2a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion files/src/renderer/80_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ let info_receiver_props = {
}

let move_cycle_pre_update = move_info.cycle;
let move_depth_pre_update = move_info.depth;

// ---------------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -237,8 +238,12 @@ let info_receiver_props = {

if (CompareArrays(new_pv, move_info.pv) === false) {
if (!board.sequence_illegal(new_pv)) {
if (move_cycle_pre_update === move_info.cycle && ArrayStartsWith(move_info.pv, new_pv)) {
if (move_cycle_pre_update === move_info.cycle
&& ArrayStartsWith(move_info.pv, new_pv)
&& move_depth_pre_update >= move_info.depth - 1
) {
// Skip the update. This partially mitigates Stockfish sending unresolved PVs.
// We don't skip the update if the old PV is too old - issue noticed by Nagisa.
} else {
move_info.set_pv(new_pv);
}
Expand Down

0 comments on commit 8412d2a

Please sign in to comment.