We’ve put together these tips to help you get up and running with machine learning.
Download Training Data
Create a training dataset by downloading historical game replay files via the Halite client.
Download the client directly here.
python -m hlt_client --helpto see a full listing of available commands and flags.
Download replay files by date:
python -m hlt_client replay date -t YYYYMMDD -d [destination_folder] ## Date example: 20181022
Download replay files by user:
python -m hlt_client replay user -i [user_id] -l [maximum_number_of_files] -d [destination_folder]
Working with Machine Learning Libraries
Tensorflow and keras are fairly verbose libraries that use
stdout, which will interfere with the game engine. Try setting
verbose=False. Failing that, you can try patching the value of
import sys, os
stderr = sys.stderr
sys.stderr = open(os.devnull, ‘w’)
Now run your import tensorflow and keras statements, and load your models. Then:
sys.stderr = stderr
Halite II Community Examples
Looking for more inspiration? There were some strong ML bot contenders in last year’s Halite II: