Question on running ICS bots

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Question on running ICS bots

Post by hgm »

I tried to leave Fairy-Max logged in all night on the ICS I was testing, to provide an opponent for the occasional person that would login. But after 60-min of idle time, the bot is logged out by the server.

How do people solve this for bots they are running on ICC or FICS? Are these servers so populated that the bots never remain idle for 60 min? Or are there scripts to restart the bot after it gets logged out? I hardly have any experience in playing engines on an ICS at all, I never got any further than participating in CCTx...
kranium
Posts: 2129
Joined: Thu May 29, 2008 10:43 am

Re: Question on running ICS bots

Post by kranium »

hgm wrote:I tried to leave Fairy-Max logged in all night on the ICS I was testing, to provide an opponent for the occasional person that would login. But after 60-min of idle time, the bot is logged out by the server.

How do people solve this for bots they are running on ICC or FICS? Are these servers so populated that the bots never remain idle for 60 min? Or are there scripts to restart the bot after it gets logged out? I hardly have any experience in playing engines on an ICS at all, I never got any further than participating in CCTx...
Hi H.G.-

Here is a script that I use when testing an engine on the ICC...
a loop logs the engine back in if for any reason it's disconnected

:loop
winboard_x -zp -ics -icshost chessclub.com -fcp engine -fd d:\engine -icshelper timestamp -xzt -zippyMaxGames 2 -zippyReplayTimeout 3600 -zippyGameEnd='\nseek 2 1 m f\nseek 5 0 m f\nseek 15 0 m f\n'
goto loop

it also contains parameters for maxgames, and replaytimeout...
i.e.
how long must an opponent wait to play the engine again if it he/she have reached the the max.

for ex:
with the script as written, if someone plays 2 games, they must wait 60 minutes to challenge the engine again...

at the end of each game, the engine issues multiple seeks
this requires zippy of course
more options can be found in the zippy.readme available at tim manns site
kranium
Posts: 2129
Joined: Thu May 29, 2008 10:43 am

Re: Question on running ICS bots

Post by kranium »

Here's a formula I use:

formula="rated & (rating >= (myrating-700)) & (etime<16) & (lag<1000) & autocolor & noescape & established & !wild & !timeodds & !freeweek"

the +-700 eliminates any games that would have no effect on rating.
(the exact number is a little different, i rounded it off)

also

from my experience...the maxgames and replay parameters in the script posted above are very important. otherwise your engine will encounter 'ELO pirates'...

i.e. a strong engine (or player) repeatedly challenging fairy-max over and over again, raping it of all the ELO points it can...
i highly recommend using a formula (as above) in combination with maxgames/replaytimeout to prevent this.

http://www.chessclub.com/help/formula

hope this helps-
Norm
Will Singleton
Posts: 128
Joined: Thu Mar 09, 2006 5:14 pm
Location: Los Angeles, CA

Re: Question on running ICS bots

Post by Will Singleton »

You can have your engine send ICC a command every 10 minutes, like "history" or whatever. On ICC there's also the noautologout deal, but I think the account has to be a free comp account to use that.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Question on running ICS bots

Post by bob »

hgm wrote:I tried to leave Fairy-Max logged in all night on the ICS I was testing, to provide an opponent for the occasional person that would login. But after 60-min of idle time, the bot is logged out by the server.

How do people solve this for bots they are running on ICC or FICS? Are these servers so populated that the bots never remain idle for 60 min? Or are there scripts to restart the bot after it gets logged out? I hardly have any experience in playing engines on an ICS at all, I never got any further than participating in CCTx...
I use a script like this in Unix:

while (1)
ics-script
sleep 10
end

which re-starts each time I get logged out. There is a variable that works for me but some have reported it does not work for everyone, depends on ICC:

set noautologout 1

which turns off the 60 second idle timer. But that doesn't obviate the need for the script loop above as occasionally a network failure (or even an ICC reboot/network problem) will still kick me off.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Question on running ICS bots

Post by bob »

kranium wrote:
hgm wrote:I tried to leave Fairy-Max logged in all night on the ICS I was testing, to provide an opponent for the occasional person that would login. But after 60-min of idle time, the bot is logged out by the server.

How do people solve this for bots they are running on ICC or FICS? Are these servers so populated that the bots never remain idle for 60 min? Or are there scripts to restart the bot after it gets logged out? I hardly have any experience in playing engines on an ICS at all, I never got any further than participating in CCTx...
Hi H.G.-

Here is a script that I use when testing an engine on the ICC...
a loop logs the engine back in if for any reason it's disconnected

:loop
winboard_x -zp -ics -icshost chessclub.com -fcp engine -fd d:\engine -icshelper timestamp -xzt -zippyMaxGames 2 -zippyReplayTimeout 3600 -zippyGameEnd='\nseek 2 1 m f\nseek 5 0 m f\nseek 15 0 m f\n'
goto loop

it also contains parameters for maxgames, and replaytimeout...
i.e.
how long must an opponent wait to play the engine again if it he/she have reached the the max.

for ex:
with the script as written, if someone plays 2 games, they must wait 60 minutes to challenge the engine again...

at the end of each game, the engine issues multiple seeks
this requires zippy of course
more options can be found in the zippy.readme available at tim manns site
You should put some sort of "sleep" in the loop. If you ever have a technical issue with your program, ICC will ban you if you start logging in and out instantly for very long. 10 seconds is more than enough to avoid the problem.
kranium
Posts: 2129
Joined: Thu May 29, 2008 10:43 am

Re: Question on running ICS bots

Post by kranium »

thanks Bob-
sounds like a good idea...
i did use this for a couple years already, running alderon, and never had an issue (that i'm aware of!)
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Question on running ICS bots

Post by Michel »

I have my client (icsdrone-ng) send a "ping" command every minute.

I.e. an (illegal) command

ping_timestamp

That seems to overcome the 60 min idle time limit.

Disclaimer: this is on FICS and not ICS.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Question on running ICS bots

Post by hgm »

I like the idea of a 'ping'. I could put this as an option in WinBoard:

winboard -ics -icsPing N

could then make WinBoard send some command, like 'who', to the ICS every N minutes, starting N minutes after the last game finishes.
User avatar
mhull
Posts: 13447
Joined: Wed Mar 08, 2006 9:02 pm
Location: Dallas, Texas
Full name: Matthew Hull

Re: Question on running ICS bots

Post by mhull »

hgm wrote:I like the idea of a 'ping'. I could put this as an option in WinBoard:

winboard -ics -icsPing N

could then make WinBoard send some command, like 'who', to the ICS every N minutes, starting N minutes after the last game finishes.
I did the ping strategy using expect, which would start xboard and then "ping" with the date command at some convenient interval less than one hour. Worked like a charm on ICC. My bot would stay up for weeks without ever logging off. It's a good way to find out how long it takes an engine to loose its marbles without a restart. :)

After a while, I added commands to the expect script to watch games of accounts I was tracking and store the results of their games in a logfile. This allowed me to transend the game history limit on ICC, keeping an unlimited number of game results for any account I wanted to track.

I did this both under linux and CYGWIN.
Matthew Hull