Live (turn by turn) bot debubbing and developement in Python (Windows)


I am looking for a solution to locally execute lines of code of the bot script, being currently under construction, even after command hlt.Game().

In particular I want to run the code line by line given a certain game state (turn) when the python instance already contains objects like game map, ships, etc. I want to display things like current ship position, halite amount etc. and maybe switch to the next turn and execute the code line by line again.

Can anyone describe a way how to achieve that?

The suggestion of using logging, provided in another thread, is not what I am looking here. I want to debug local games “live” i.e. “on the fly”.


First of all disable 2s turn timeout (see halite.exe --help, I forget exact argument name :smiley:). Then read this thread. This will be enough to turn by turn debugging. Another tool is Iodine: a Halite 3 realtime viewer. But I don’t use it so can’t say anything about it. Finally you can write you own live visualizer (I did it for my bot using PyGame, basic version could be done in 70-100 lines) or some matplotlib scripts that parse replays/datadumps.