From: Steinar H. Gunderson Date: Sun, 1 Jul 2007 15:12:31 +0000 (+0200) Subject: Minor reorganization. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=070a7919758dca209075c4d9d5ba10fb7f62db36 Minor reorganization. --- diff --git a/remoteglot.pl b/remoteglot.pl index 24ce2e7..69ba997 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -16,15 +16,17 @@ use Time::HiRes; use strict; use warnings; -$SIG{ALRM} = sub { output_screen(); }; - -$| = 1; - +# Configuration my $server = "freechess.org"; my $target = "Sesse"; # my $engine = "/usr/games/toga2"; my $engine = "wine Rybkav2.3.2a.mp.w32.exe"; +# Program starts here +$SIG{ALRM} = sub { output_screen(); }; + +$| = 1; + open(FICSLOG, ">ficslog.txt") or die "ficslog.txt: $!"; print FICSLOG "Log starting.\n"; @@ -56,7 +58,7 @@ uciprint("setoption name UCI_AnalyseMode value true"); uciprint("setoption name NalimovPath value c:\\nalimov"); uciprint("setoption name NalimovUsage value Rarely"); uciprint("setoption name Hash value 1024"); -# uciprint("setoption name MultiPV value 3"); +uciprint("setoption name MultiPV value 3"); # uciprint("setoption name Contempt value 1000"); # uciprint("setoption name Outlook value Ultra Optimistic"); uciprint("ucinewgame"); @@ -99,6 +101,15 @@ while (1) { uciprint("stop"); uciprint("position fen $fen"); uciprint("go infinite"); + + # + # Output a command every move to note that we're + # still paying attention -- this is a good tradeoff, + # since if no move has happened in the last half + # hour, the analysis/relay has most likely stopped + # and we should stop hogging server resources. + # + $t->cmd("date"); } #print "FICS: [$line]\n"; $sleep = 0;