From: Steinar H. Gunderson Date: Wed, 23 Mar 2016 19:25:42 +0000 (+0100) Subject: Fix a bug where fathom would cause all winning multi-PV lines to be the same. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=f26a218756768fcbbbcd332e56029053e359003c Fix a bug where fathom would cause all winning multi-PV lines to be the same. --- diff --git a/remoteglot.pl b/remoteglot.pl index e021c66..9439a4b 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -558,6 +558,13 @@ sub complete_using_tbprobe { if (exists($pos->{'tbprobe_cache'}{$key})) { @moves = $pos->{'tbprobe_cache'}{$key}; } else { + if ($mpv ne '') { + # Force doing at least one move of the PV. + my $move = shift @pv; + push @moves, $move; + $pos = $pos->make_move(parse_uci_move($move)); + } + while ($pos->num_pieces() > 6 && $#pv > -1) { my $move = shift @pv; push @moves, $move;