It is currently Wed Jul 23, 2014 8:07 pm Advanced search

random map generator

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

random map generator

Postby pgpaskar » Sat Feb 06, 2010 9:53 am

So this is a random map generator. It'll generate regular boards in the format expected by both the Java tourny engine and nneonneo's tourny engine (with -p option). You'll need to compile this yourself; here's how!

Type `make all`
and then `./mapgen <options>`

Also, type `./mapgen -help` for a list of options. It will output the map to stdout. Feel free to pipe this to a file or enter it directly into your call to the tourny engine of your choice (remember to add -p for nneonneo's (unless you use the BoardFile technique as described in the second post))

Examples:

Code: Select all
# makes a random 40x30 map to map.txt
./mapgen -x 40 -y 30 > map.txt

# makes a random 33x21 with only point symmetry
./mapgen -x 33 -y 21 -l 1 > map.txt

# makes a random 70x70 maze map
./mapgen -x 70 -y 70 -m > maze.txt

# run random map with nneonneo's engine
./round.py <your bot here> <second bot here> -vvv -b "$(./mapgen -p)"


# run random maze map with nneonneo's engine
./round.py <your bot here> <second bot here> -vvv -b "$(./mapgen -p -m)"


Changelog:

06 feb 2010
- added -d and -m options (see -help)
- added min board size of 6x6
Attachments
mapgen.tar.bz2
teh
(3.28 KiB) Downloaded 158 times
Last edited by pgpaskar on Sun Feb 07, 2010 12:04 am, edited 2 times in total.
User avatar
pgpaskar
Lieutenant
 
Posts: 13
Joined: Mon Feb 01, 2010 1:24 am

Re: random map generator

Postby nneonneo » Sat Feb 06, 2010 6:18 pm

The newest version of the Python engine supports board files in the Java format with -B (in round.py) and the BoardFile function (in tournament.py), so it's possible to use the Java map files with Python, if you so desire.
nneonneo
Captain
 
Posts: 26
Joined: Sun Jan 31, 2010 5:39 am

Re: random map generator

Postby amstan » Sun Feb 07, 2010 1:32 am

Here you can find some videos i made for this map generator, helped by nneonneo's visualizer.
http://csclub.uwaterloo.ca/~amstan/upload/tronmovies/
Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario


Return to Misc

Who is online

Users browsing this forum: No registered users and 1 guest

cron