]> git.sesse.net Git - remoteglot/blobdiff - remoteglot.pl
Fix a bug where fathom would cause all winning multi-PV lines to be the same.
[remoteglot] / remoteglot.pl
index e021c664894e4fb0a077f82ec81d79abff6fc61b..9439a4bc4d0b063c59b1eb2738cc9cd0c4b987d5 100755 (executable)
@@ -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;