The Halite environment is responsible for running games between bots and outputting appropriate data and files upon the end of a game. The downloadable version is the same version used on the servers.
It may be passed a number of flags, including:
-d
: allows the automatic input of the dimensions of the map. The following argument is expected to be a string containing the width and height (space-separated).-t
: disables timeouts for the duration of the game.-q
: turns on quiet output. Output will take the form of:
-o
option is also specified, lines with the command used to run each bot (one bot per line).n
players in the game, n
lines like so: playerID rank lastFrameAlive
-s
: provides the seed to the map generator. If this is not provided, it will use a time-based seed.To run your bot against itself on a 40 by 40 map with no timeouts, run:
./halite -d “40 40” -t “python3 MyBot.py” “python3 MyBot.py”
.\halite.exe -d “40 40” -t “python3 MyBot.py” “python3 MyBot.py”
To run your python bot against a java bot (assuming it’s been compiled) on a 25 by 25 map with a predefined seed (2168), run:
./halite -d “25 25” -s 2168 “python3 PythonBot.py” “java JavaBot”
.\halite.exe -d “25 25” -s 2168 “python3 PythonBot.py” “java JavaBot”