Fix a bug where fathom would cause all winning multi-PV lines to be the same.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 23 Mar 2016 19:25:42 +0000 (20:25 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 23 Mar 2016 19:25:42 +0000 (20:25 +0100)
remoteglot.pl

index e021c66..9439a4b 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;