Turn off the new pipelining stuff by default; engines are too buggy.
authorSteinar H. Gunderson <sesse@debian.org>
Sat, 7 Jul 2007 11:17:17 +0000 (13:17 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Sat, 7 Jul 2007 11:17:17 +0000 (13:17 +0200)
remoteglot.pl

index 62bb4b1..28bebd2 100755 (executable)
@@ -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");