Halite Environment CLI

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:
    • Unless the -o option is also specified, lines with the command used to run each bot (one bot per line).
    • A line showing the actual map size used.
    • A line containing the replay file name, a space, and the map seed.
    • For n players in the game, n lines like so: playerID rank lastFrameAlive
    • A line of space separated playerIDs of the players that timed out.
    • A line of space separated timeout log filenames.
  • -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:

  • Linux/macOS: ./halite -d “40 40” -t “python3 MyBot.py” “python3 MyBot.py”
  • Windows: .\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:

  • Linux/macOS: ./halite -d “25 25” -s 2168 “python3 PythonBot.py” “java JavaBot”
  • Windows: .\halite.exe -d “25 25” -s 2168 “python3 PythonBot.py” “java JavaBot”

Terms of Service | Privacy Policy