Updated match manager from Halite I (Unofficial)


#1

I've made some minimal updates to the match manager I prepared for Halite I, so it works with the new game:

Halite 2 Match Manager

I notice the new tools have a Gym mode with some similarities to this. One difference though, is that this manager stores previous ranking results, so you can more rapidly evaluate a new version against an existing stable leaderboard.

There's a lot more I would like to add to this, such as storing the log files properly and presenting everything with a nice GUI, but I somehow doubt that I'll actually get time. I'm posting this here now because it's probably in a useful state and may not be updated again (by me) for a while.


#2

Awesome. If you want to contribute this to repo, happy to take it :slight_smile:


#3

@harikmenon: I'd be happy to add it to the repo, but I'm not sure about the best way to incorporate it. I could submit a pull request with the manager added in some appropriate subdirectory, but that might not be ideal for keeping it up-to-date. Would including it as a git submodule make sense? My knowledge of more complex git project management is a bit thin.


#4

I've updated a few things since the original post - a few bugfixes, replays and logs are moved (or deleted if you specify), and you can launch the visualizer for stored matches. Visualizer installation has to be done separately - currently it's set up to expect @fohristiwhirl's visualizer installed in "../visualizer" relative to the manager directory. To see the records of the latest three matches in the database, you would issue this command:

./manager.py -R 0 --limit 3

To visualize the match with id 16, you would issue this command:

./manager.py -V 16

A few more common uses are presented below.

To add a bot (executable file):
./manager.py -A bot_name -p ./bots/bot_binary

To add a Python3 bot:
./manager.py -A bot_name -p "python3 bots/pbot1/MyBot.py"

To run a single match:
./manager.py -m

To run matches forever (can be interrupted softly by keypress):
./manager.py -f

These instructions assume Bash as the shell; some adaptation will be needed for Windows (e.g you may need to invoke python3 with manager.py as an argument - but I don't have a Windows system to test on so I won't attempt to write exact commands).


#5

I would recommend 2 things, instead of sub-modules (nobody knows how to use them effectively). Just create a PR to the tools/ folder. And add a readme file explaining the functionality and one of us will promote that to official docs and make sure you get the credit.


#6

Awesome, thanks! I was able to get this up and running with the directions given, and a minor modification to the source pointing to where my halite executable lived.