]> git.sesse.net Git - remoteglot/blobdiff - remoteglot.pl
Preserve analysis is not a good default.
[remoteglot] / remoteglot.pl
index 9d88db75727817d0324f7c315e301e2f5b95fa22..62bb4b1051a1cd94c31838ab3b80ca19b0723a77 100755 (executable)
@@ -60,7 +60,7 @@ while (<UCIREAD>) {
 }
 
 uciprint("setoption name UCI_AnalyseMode value true");
-uciprint("setoption name Preserve Analysis value true");
+uciprint("setoption name Preserve Analysis value true");
 uciprint("setoption name NalimovPath value c:\\nalimov");
 uciprint("setoption name NalimovUsage value Rarely");
 uciprint("setoption name Hash value 1024");
@@ -116,7 +116,9 @@ while (1) {
                        # if we're already thinking on something, stop and wait for the engine
                        # to approve
                        if (defined($pos_calculating)) {
-                               uciprint("stop");
+                               if (!defined($pos_waiting)) {
+                                       uciprint("stop");
+                               }
                                $pos_waiting = $pos;
                        } else {
                                # it's wrong just to give the FEN (the move history is useful,
@@ -161,7 +163,7 @@ sub handle_uci {
 
        chomp $line;
        $line =~ tr/\r//d;
-       print UCILOG "<= $line\n";
+       print UCILOG localtime() . " <= $line\n";
        if ($line =~ /^info/) {
                my (@infos) = split / /, $line;
                shift @infos;
@@ -838,7 +840,7 @@ sub can_reach {
 sub uciprint {
        my $msg = shift;
        print UCIWRITE "$msg\n";
-       print UCILOG "=> $msg\n";
+       print UCILOG localtime() . " => $msg\n";
 }
 
 sub short_score {