It is currently Sat Aug 02, 2014 2:44 am Advanced search

Python Tournament Engine

Random stuff about the contest, posts that don't fit in the other forums.

Python Tournament Engine

Postby nneonneo » Tue Feb 02, 2010 11:17 pm

After a few days of feverish coding, the Python tournament engine is ready for general use.

This engine comprises two main programs: round and tournament.

Round runs a single match against two players (either human or bot), allowing you to play matches directly against your bot to test its mettle.

Tournament runs a full tournament between any number of bot players, allowing you to quickly test multiple strategies and variations against each other.

Both can be run as-is, and they will prompt you for the initial setup. They each have several command-line options for power users, and you can get more information with the "--help" switch.

Windows users are recommended to get the "windows.zip" package, which includes precompiled versions of both programs, so you don't need Python installed. The Windows package also includes two precompiled starter bots (starter_cs from the C# package and starter_cpp from the C++ package) so that you can try out the tournament and round features without needing to have a bot of your own.

Everyone else should get the "source.zip" or "source.tar.gz" package, which includes executable Python source code for both programs.

Grab them here: http://csclub.uwaterloo.ca/~b2xiao/ai/

If you have any questions, problems, comments or concerns, please voice them in this thread!

Changelog:
Feb 7 2010
  • Added Java tournament maps
  • Added visualizer output for nsasherr's visualizer (pdf/png output like the forum header image) and pgpaskar's visualizer (JavaScript visualizer still in development)
  • Fixed encoding-related bug in Windows package; thanks to m3lawren for finding this

Feb 4 2010
  • Files can now be used to specify intricate board layouts. The format is two integers on a line (width and height) separated by a space, followed by several lines containing "#" for walls and " " for spaces; see sampleboard.txt for an example and sampleboardlist.txt for use in a tournament.
  • Timing adjustments for the tournament engine: the final result of each match is now shown for a longer time in detail level 3 (-vvv) mode.
  • Included MSVCR71.dll in the Windows packages to fix missing DLL errors on certain Windows computers
  • Fixed -u flag to tournament engine to make specific bots play in every round (this is similar to gauntlet.py, posted below).
Attachments
source.tar.gz
Python Tournament Engine source code (.tar.gz), Feb 7 2010, Downloaded 73 times
(9.05 KiB) Downloaded 269 times
source.zip
Python Tournament Engine source code (.zip), Feb 7 2010, Downloaded 35 times
(12.63 KiB) Downloaded 182 times
windows.zip
Windows Tournament Engine, Feb 7 2010, Downloaded 59 times
(1.88 MiB) Downloaded 290 times
Last edited by nneonneo on Wed Jun 08, 2011 1:34 am, edited 2 times in total.
nneonneo
Captain
 
Posts: 26
Joined: Sun Jan 31, 2010 5:39 am

Re: Python Tournament Engine

Postby nneonneo » Tue Feb 02, 2010 11:20 pm

Usage notes:

To run multiple commands for a bot, separate the commands with a & character on Windows, or a ; character on non-Windows computers. So, for instance, if you need to change directories to run your bot, you would use

(Windows)
Code: Select all
cd ../bot/ & bot_program


(Linux, UNIX, Mac OS X, etc.)
Code: Select all
cd ../bot/; bot_program
nneonneo
Captain
 
Posts: 26
Joined: Sun Jan 31, 2010 5:39 am

Re: Python Tournament Engine

Postby mzulak » Wed Feb 03, 2010 12:36 am

Holy hell, this tournament engine is hella-sweet, especially with -vvv. :) Thanks so much for putting this together!
mzulak
Cadet
 
Posts: 9
Joined: Mon Feb 01, 2010 10:17 pm

Re: Python Tournament Engine

Postby amstan » Thu Feb 04, 2010 1:28 am

How do i give round.py a map that i made?
Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario

Re: Python Tournament Engine

Postby nneonneo » Thu Feb 04, 2010 4:28 am

amstan wrote:How do i give round.py a map that i made?


Code: Select all
./round.py BOT1 BOT2 -b "Board(10,10,layout=[
'##1    ###',
'###    ###',
<snip>
'###    2##'])"
nneonneo
Captain
 
Posts: 26
Joined: Sun Jan 31, 2010 5:39 am

Re: Python Tournament Engine

Postby amstan » Thu Feb 04, 2010 4:46 am

Ugh, could you make it input a map file, tron.jar like?
Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario

Re: Python Tournament Engine

Postby nneonneo » Thu Feb 04, 2010 5:20 am

Done in SVN, try it out (it's the "-B" flag for a filename and "-b" for a board specification).
nneonneo
Captain
 
Posts: 26
Joined: Sun Jan 31, 2010 5:39 am

Re: Python Tournament Engine

Postby amstan » Thu Feb 04, 2010 5:33 am

Could you update your attachments in this topic, forum users can't access the svn.
Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario

Re: Python Tournament Engine

Postby nneonneo » Thu Feb 04, 2010 5:34 am

I'm still shaking it down to make sure it works. Packages will be updated when they are ready.
nneonneo
Captain
 
Posts: 26
Joined: Sun Jan 31, 2010 5:39 am

Re: Python Tournament Engine

Postby joeyjoejoe » Thu Feb 04, 2010 6:01 am

I have modified tournament.py slightly to create gauntlet.py

It works essentially the same, except it runs the champion (the first program listed in the botlist.txt) against the field, instead of the field against the field. This might be useful if you're just trying to test one program against a range of bots.

Kyle
Attachments
gauntlet.zip
the gauntlet script
(2.02 KiB) Downloaded 130 times
joeyjoejoe
Cadet
 
Posts: 2
Joined: Thu Feb 04, 2010 5:54 am

Next

Return to Misc

Who is online

Users browsing this forum: No registered users and 1 guest

cron