sub handle_uci {
my ($engine, $line, $primary) = @_;
+ return if $line =~ /(upper|lower)bound/;
+
$line =~ s/ / /g; # Sometimes needed for Zappa Mexico
print UCILOG localtime() . " $engine->{'tag'} <= $line\n";
if ($line =~ /^info/) {
$pgn->quick_parse_game;
my $pos = Position->start_pos($pgn->white, $pgn->black);
my $moves = $pgn->moves;
+ my @uci_moves = ();
for my $move (@$moves) {
my ($from_row, $from_col, $to_row, $to_col, $promo) = $pos->parse_pretty_move($move);
+ push @uci_moves, Board::move_to_uci_notation($from_row, $from_col, $to_row, $to_col, $promo);
$pos = $pos->make_move($from_row, $from_col, $to_row, $to_col, $promo);
}
+ $pos->{'history'} = \@uci_moves;
+ $pos->{'pretty_history'} = $moves;
handle_position($pos);
}
delete $info->{'score_cp' . $mpv};
delete $info->{'score_mate' . $mpv};
- while ($x[0] eq 'cp' || $x[0] eq 'mate' || $x[0] eq 'lowerbound' || $x[0] eq 'upperbound') {
+ while ($x[0] eq 'cp' || $x[0] eq 'mate') {
if ($x[0] eq 'cp') {
shift @x;
$info->{'score_cp' . $mpv} = shift @x;