From: Steinar H. Gunderson Date: Sat, 7 Jul 2007 11:17:17 +0000 (+0200) Subject: Turn off the new pipelining stuff by default; engines are too buggy. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=9dd7122b75bf598f16a18a70bc8b2eb519d0796b Turn off the new pipelining stuff by default; engines are too buggy. --- diff --git a/remoteglot.pl b/remoteglot.pl index 62bb4b1..28bebd2 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -23,6 +23,7 @@ my $target = "22"; my $engine = "wine Rybkav2.3.2a.mp.w32.exe"; 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 = 0; # dangerous :-) # Program starts here $SIG{ALRM} = sub { output_screen(); }; @@ -119,7 +120,13 @@ while (1) { if (!defined($pos_waiting)) { uciprint("stop"); } - $pos_waiting = $pos; + if ($uci_assume_full_compliance) { + $pos_waiting = $pos; + } else { + uciprint("position fen " . $pos->{'fen'}); + uciprint("go infinite"); + $pos_calculating = $pos; + } } else { # it's wrong just to give the FEN (the move history is useful, # and per the UCI spec, we should really have sent "ucinewgame"), @@ -176,7 +183,7 @@ sub handle_uci { parse_ids(@ids); } - if ($line =~ /^bestmove/) { + if ($line =~ /^bestmove/ && $uci_assume_full_compliance) { if (defined($pos_waiting)) { uciprint("position fen " . $pos_waiting->{'fen'}); uciprint("go infinite");