[Computer-go] Fuego standard opponent on CGOS
Brian Sheppard
sheppardco at aol.com
Thu Sep 1 08:50:28 PDT 2011
I am running six Fuego instances (and four Mogo instances) concurrently from the same directory with no problems. Of course, an intermittent crash might not have revealed itself yet.
There is a difference in how I have written the batch files, though. Perhaps that is relevant. I wanted to start/stop each program individually, and I noticed that several loops can be eliminated in that case. The code is simpler, and can be simplified further by making the engine name into a parameter.
Actually, everything above the :LOOP statement is only present for initialization.
@echo off
cls
set portNumber=6867
set size=9
set sgfFiles=*.sgf
set kll=q%size%
set suffixFile=suffix.txt
set passwordFile=password.txt
set engine=Fuego0.4.1-300
:: Delete any old .SGFs
if exist %sgfFiles% (
del %sgfFiles%
)
:: Initialise suffix if not already present
if not exist %suffixFile% (
echo Suffix and password not yet set
set /p passwd="Enter Password: "
set /p suffix="Enter Suffix (single character): "
echo.
)
if not exist %suffixFile% (
echo Password set to %passwd%
echo %passwd% > %passwordFile%
echo %suffix% > %suffixFile%
echo If suffix %sfx% is already in use, login will fail
echo If so, to change suffix, edit %suffixFile%
pause
)
:: Ensure suffix and password files only have one entry (discards all but last line)
for /f %%P in (%passwordFile%) do (
echo %%P > %passwordFile%
)
for /f %%S in (%suffixFile%) do (
echo %%S > %suffixFile%
)
:: Write the config files
for /f %%P in (%passwordFile%) do (
:: Read in suffix
for /f %%S in (%suffixFile%) do (
:: Check config file is present
if not exist %engine%_%size%.txt (
echo ERROR: Launch command file "%engine%_%size%.txt" is missing, skipping _%engine%_%%S
pause
) else (
echo %%section server > _%engine%_%%S_%size%.cfg
echo server cgos.boardspace.net >> _%engine%_%%S_%size%.cfg
echo port %portNumber% >> _%engine%_%%S_%size%.cfg
echo. >> _%engine%_%%S_%size%.cfg
echo %%section player >> _%engine%_%%S_%size%.cfg
echo name _%engine%,%%S >> _%engine%_%%S_%size%.cfg
echo password %%P >> _%engine%_%%S_%size%.cfg
type %engine%_%size%.txt >> _%engine%_%%S_%size%.cfg
echo priority 10 >> _%engine%_%%S_%size%.cfg
)
)
)
:LOOP
for /f %%S in (%suffixFile%) do (
:: Create quit file so that engine stops after one run
copy %engine%_%size%.txt %kll%_%engine%_%%S.%kll% > nul
echo starting _%engine%_%%S
echo To Shutdown Engines: Close this window. Engines will quit after game.
:: Use /belownormal priority, so the system UI remains responsive even at peak loads.
:: Use /B to avoid creating a new window for the process.
start /B /BELOWNORMAL /wait "_%engine%_%%S_ %size%x%size%" tclkitsh cgosGtp.kit -c _%engine%_%%S_%size%.cfg -k %kll%_%engine%_%%S.%kll%
)
echo All engines have completed their games, restarting...
goto LOOP
From: computer-go-bounces at dvandva.org [mailto:computer-go-bounces at dvandva.org] On Behalf Of René van de Veerdonk
Sent: Thursday, September 01, 2011 1:27 AM
To: computer-go at dvandva.org
Subject: Re: [Computer-go] Fuego standard opponent on CGOS
Okay,
I played around a little and have the "heavy" versions working, or so it seems from watching things go for about an hour. But I failed to add the low playout count Fuego instances to the "lite" pack. I added 300, 1k, and 3k versions the same way I added the others to the "heavy" pack and they all start, but as soon as they have to make their first move they crash. The issue may be that all three are running in the same directory or they may be missing a file (although I think I copied everything that seems even potentially relevant). This caused a few games ending in losses on time. I subsequently removed the lite-Fuego instances. I could add them to the "heavy" pool, but that would dilute it too much, as the "heavy" script runs them on- by-one instead of in parallel.
René
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://computer-go.org/pipermail/computer-go/attachments/20110901/69df6733/attachment.html>
More information about the Computer-go
mailing list