Convert user game data into hlt format


I’m trying to train my bot using game data from online.

I’m calling this command to download my bot’s game data
python -m hlt_client replay user -i [user_id] -l [maximum_number_of_files] -d [destination_folder]

But the data format is a JSON in a file with no .hlt ending so I cannot use it in

How are you guys training your data?



If you cannot compress into the .hlt.

In model and both I think… Remove “zstd.loads()” from the command loading in the replays.

Also there is a check for “.hlt” files. Remove that as well.

I’m not at my machine or I would def give your exact line numbers and files. Those are the two changes I made to read the replays downloaded with the halite client.

Once loaded into train, they are all uncompressed now anyhow.

Edit: might just be in


I was entirely wrong. it’s “”

line 15: change to “data = json.loads(” from “data = json.loads(zstd.loads(” as this will enable you to read the uncompressed replays. I should have just added support for both, but Im lazy.

I cannot for the life of me figure out where I removed the check for a .hlt file. It wont throw an error either, it will just skip them. If I can remember I will post it.


Ah yes I had figured this out if the file doesn’t contain .hlt it will continue the loop but it will also throw an exception if the replay file doesn’t contain the player name as it continues to run through the program. Also have to change the read to not interpret the input as bytes. But also in regards to training the data, it seems that the bot performs worse with the game data I’m training it on. I’m quite new to ML so should I be training it on games it wins? I also have to hardcode some things to increase the functionality like making dropoffs etc. but hoping I could use some ML as to make that decision for me