Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

SVM Starter Kit

Starter kit components

  • Two pre-trained example bots, comprised of a python file that references, and a .svc model weight file: ** Passive bot:, passive.svc ** Aggressive bot:, aggressive.svc
  • Resources for training a new SVM bot ** Empty replays directory, into which you put game replay files for training **, which you run to train a new bot **, which parses replay files during training **, which will define your model
  •, which will install dependencies
  • /hlt directory, which contains modifiable helper functions for your bot
  • A Halite executable that enables local playtesting of your bot
  • The scripts run_game.bat (Windows) and (MacOS, Linux)

Training a new bot

Download Training Data

Create a training dataset by downloading historical game replay files via the Halite client.

python -m hlt_client

  • Download replays for your target training user(s). The download destination_folder should be your replays directory.

python -m hlt_client replay user -i [user_id] -l [maximum_number_of_files] -d [destination_folder]

Train your bot

  • Update with the name of your training user(s). The name is case-sensitive. For example, to train on a user named "aggressive", for whom you have downloaded replays, you would insert the following into the file:
m = model.HaliteModel()
m.train_on_files('training', 'aggressive')'aggressive.svc')
  • Run

Testing your bot locally

  • Run run_game.bat (Windows) and (MacOS, Linux) to run a game of Halite III. By default, these scripts run a game of your bot vs. itself. You can modify the board size, map seed, and the opponents of test games using the CLI.


The Halite executable comes with a command line interface (CLI). Run $ ./halite --help to see a full listing of available flags.

Submitting your bot

  • Duplicate the example or, and rename the file "". If you have trained a new bot, update the file with the correct references to your new bot file and model weight.
  • Zip,,,, and the /hlt directory together.
  • Submit your zipped file here:
You can’t perform that action at this time.