# Configuration
my $server = "freechess.org";
-my $target = "278";
-# my $engine = "/usr/games/toga2";
-# my $engine = "wine Rybkav2.3.2a.mp.w32.exe";
-my $engine = "~/microwine-0.2/microwine Rybkav2.3.2a.mp.x64.exe";
+my $target = "GMCarlsen";
+my $engine = "'./Deep Rybka 4 SSE42 x64'";
my $telltarget = undef; # undef to be silent
my @tell_intervals = (5, 20, 60, 120, 240, 480, 960); # after each move
-my $uci_assume_full_compliance = 1; # dangerous :-)
+my $uci_assume_full_compliance = 0; # dangerous :-)
my @masters = (
'Sesse',
'Sessse',
- 'Sesssse'
+ 'Sesssse',
+ 'greatestguns',
+ 'beuki'
);
# Program starts here
}
uciprint("setoption name UCI_AnalyseMode value true");
-# uciprint("setoption name Preserve Analysis value true");
-uciprint("setoption name NalimovPath value /srv/tablebase");
+# uciprint("setoption name NalimovPath value /srv/tablebase");
uciprint("setoption name NalimovUsage value Rarely");
uciprint("setoption name Hash value 1024");
-uciprint("setoption name MultiPV value 2");
-# uciprint("setoption name Contempt value 1000");
-# uciprint("setoption name Outlook value Ultra Optimistic");
+# uciprint("setoption name MultiPV value 2");
uciprint("ucinewgame");
print "Chess engine ready.\n";
my $t = Net::Telnet->new(Timeout => 10, Prompt => '/fics% /');
$t->input_log(\*FICSLOG);
$t->open($server);
-$t->print("guest");
+$t->print("SesseBOT");
$t->waitfor('/Press return to enter the server/');
$t->cmd("");
chomp $line;
$line =~ tr/\r//d;
+ $line =~ s/ / /g; # Sometimes needed for Zappa Mexico
print UCILOG localtime() . " <= $line\n";
if ($line =~ /^info/) {
my (@infos) = split / /, $line;
$castling .= "k" if ($x[13] == 1);
$castling .= "q" if ($x[14] == 1);
$castling = "-" if ($castling eq "");
+ # $castling = "-"; # chess960
$fen .= " ";
$fen .= $castling;
my $piece = substr($board->[$from_row], $from_col, 1);
if ($piece eq '-') {
- die "Invalid move";
+ die "Invalid move $pv";
}
# white short castling
$text .= "\n\n";
}
- $text .= book_info($pos_calculating->{'fen'}, $pos_calculating->{'board'}, $pos_calculating->{'toplay'});
+ #$text .= book_info($pos_calculating->{'fen'}, $pos_calculating->{'board'}, $pos_calculating->{'toplay'});
if ($last_text ne $text) {
print "\e[H\e[2J"; # clear the screen
}
my $ret = `./booklook $fen`;
- return '' if ($ret =~ /Not found/ || $ret eq '');
+ return "" if ($ret =~ /Not found/ || $ret eq '');
my @moves = ();