]> git.sesse.net Git - remoteglot/commitdiff
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 62bb4b1051a1cd94c31838ab3b80ca19b0723a77..28bebd25cfcf57de6e1685b83b202e9c03ebb70f 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");