[Pogamut-list] Experiments / workaround

michal.bida pogamut-forum at diana.ms.mff.cuni.cz
Thu Jan 19 20:25:48 CET 2012


Re: Experiments / workaround

Author: michal.bida

Ok, in case anyone is interested, here is my crude workaround. :-)
What I did for my diploma thesis was a .bat file.. The bat file I automatically creates Unreal server, then it runs whatever jar file containing my bot or bots, then it waits for several minutes - depends how long I expect the experiment to run, then it kills everything and runs it again. :-) 

This code is for Windows 7.
{CODE()}
:: Automatically runs the emotion experiment
::
@ECHO ON

SET LOOP=0

::run another experiment
ECHO RUNNING EXPERIMENT %LOOP%

:: f:
:: turns ucc server with gamebots on - ucc.exe
START C:\Games\UT2004\launch_UT_SERVER.bat
:: wait for the server to come online
TIMEOUT 30
:: turns on my bots
START c:\Pogamut\PogamutPrivate\amis-private\projects\EmohawkScenarioMaven\EmohawkScenario-3.2.3.one-jar.jar
:: waits 2800 seconds
TIMEOUT 2800

:LOOP
::KILL previous process
TASKKILL /F /IM "javaw.exe"
TASKKILL /F /IM "UCC.exe"
::wait a bit
TIMEOUT 10

::run another experiment
ECHO RUNNING EXPERIMENT %LOOP%
:: turns ucc server with gamebots on
START C:\Games\UT2004\launch_UT_SERVER.bat
:: wait for the server to come online
TIMEOUT 30
:: turns on bots
START c:\Pogamut\PogamutPrivate\amis-private\projects\EmohawkScenarioMaven\EmohawkScenario-3.2.3.one-jar.jar
:: sleep 2800 seconds
TIMEOUT 2800

SET /A LOOP+=1
:: do it 50 times
IF NOT "%LOOP%" == "50" GOTO LOOP


:: clear variable loop at the end - batch variables are global
SET LOOP=

:END

{CODE}

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=883&post_reply=1#form>





More information about the Pogamut-list mailing list