JPELGRIMS

Halite competition

I recently decided to compete in the Halite competition, hosted by the hedge fund Two Sigma. Halite is a programming game where one builds a bot to compete against other player's bots. All players end up in the continually updated rankings, according to their bots' performance. The competition runs until the 2nd of February, which is when the winners will be declared. This post is meant to document my attempts at playing the game.

Building a bot development environment

Developing and testing Halite bots is a fairly repetitive process, so I wrote some software called Halter to help. It can handle both C# and python bots (provided csc.exe and python.exe are in the windows PATH variable). This functionality can be very useful when developing bots. Python is perfect for developing proof-of-concept bots, but it is also rather slow, potentially causing a bot to time-out during a game. The bot can then be rewritten in C#, hopefully solving the time-out issues due to the speed-up.

In order to publish a bot one can use the following command:

   $halter.py publish %botfile%

This will cause Halter to build a zip file containing the bot and all necessary environment files. The halite website will then be openend using the default browser, where the user can upload the bot package. I have not found a way to completely automate the uploading process yet, so for now this will have to do.

To run a battle between two bots one can use this command:

   $halter.py battle %comma-delimited list of bot files%

The replay (.hlt) file will be stored in the 'replays' folder after the battle.