Welcome, Guest. Please Login or Register.
Apr 29th, 2024, 4:39pm

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Automatic testing »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   Automatic testing
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Automatic testing  (Read 921 times)
unic
Forum Guru
*****



Arimaa player #1878

   


Gender: male
Posts: 63
Automatic testing
« on: May 18th, 2006, 11:03am »
Quote Quote Modify Modify

I've written a minimal C-program which automatically plays a match between two programs, using random setups and utilizing the matchOffline-scripts.
 
... personally, I couldn't use the matchOffline-scripts as they were for match-playing or testing, as Fairy has no randomness, and thus would play the same game every time.  
 
In case anybody else is interested in this, I zipped it and uploaded it to http://www.df.lth.se/~unic/playtest.zip - to use it, just unzip it into your matchOffline directory.
 
Included are c-source code "playtest.c" (ugly - no error checking, it's just a quick hack.  Compiles fine under Dev-C++ using MinGW), "playtest.exe" which runs a series of games (the two arguments required are the two bots which are to play: their names in the "bots" file), "openings.txt" (which contain a list of different setups (normalized, so elephant is always in columns a-d) for gold - silver's setups are same, and mirror versions are generated as well).
 
openings.txt are taken from recent games by gold players rated 1650+ on the server - I hope to extend this with time, in order to decrease the chance of repeat games in test matches... ought to write a program to parse the game database and automatically generate an openings.txt - but for now, this will do.
 
A directory 'games' needs to be created, in which the games will be saved.  And of course, matchOffline is required.
 
playtest.exe chooses a random gold and silver opening, and then plays two games with that opening - one with each bot as gold - so neither bot will get an advantage if an opening is particularly weak or strong for a side.  This is repeated for 50 different opening setups, i.e. 100 games total.  Number is hardcoded in playtest.c - so if you want to change it, you'll need to recompile.
 
Also included in the zip-archive is an .exe for Fairy, thinking 5 seconds/move (which should let it play a 100-game match over a night, more or less).  You need to add a suitable line to your bots file to use this.
 
Any other bot developers willing to share a .exe for their bots (preferably quick-playing, so many games can be played)?  It would certainly be useful for automatic offline testing.
« Last Edit: May 18th, 2006, 11:08am by unic » IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.