|
||
Title: Automatic testing Post by unic on May 18th, 2006, 11:03am 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. |
||
Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1! YaBB © 2000-2003. All Rights Reserved. |