Halite 3 Reloader script


Here’s a script to take a replay file and feed it to your bot. Differences between the bot’s output and the replay output (for some specified player ID) are shown.

Replaying a replay file in debug mode

This saved me a bit of time. Thanks!



This is what I am looking for but I have an error whenever I try to launch it.
reload.py is in my halite folder along with the replay.hlt json format file, the Bot_v7.py python file
I run the following command and receive the following error:
D:\PycharmProjects\Halite\Halite3_64>python reload.py replay.hlt 0 Bot_v7.py
Traceback (most recent call last):
File “reload.py”, line 385, in
File “reload.py”, line 240, in main
links.append(subprocess.Popen(sys.argv[n], shell = False, stdin = subprocess.PIPE, stdout = subprocess.PIPE))
File “D:\Miniconda3\lib\subprocess.py”, line 756, in init
restore_signals, start_new_session)
File “D:\Miniconda3\lib\subprocess.py”, line 1155, in _execute_child
OSError: [WinError 193] %1 is not a valid Win32 application

Is there anything I missed ?



Ok, I got it. The command was wrong and subprocess wasn’t accepting just Bot_v7.py, instead this works: python reload.py replay.hlt 0 “python.exe Bot_v7.py”


@fohristiwhirl, really thanks for your script. It is extremely helpful for debugging.

Can you help to explain why the difference between the replay output and bot’s output does exist sometimes?
Does the beginning of the difference starts to trigger downstream effect like forking?


Well, any randomness at all in the bot can put the bot into a different state from what happened on the server.

Alternatively, the replay script may send information (e.g. ship locations) in a different order, which might change what the bot does (pro-tip: sort your ships by id before choosing moves for them).