thebotslam

Why did my bot lose, and how do I find out what went wrong?

1. Find the turning point

Look at Teams beside the field for each bot's hull, and at the timeline for clusters of marks. Click the first bad event in Events (say, your bot being hit) to jump 1.5 s before it and watch it at half speed. Step tick by tick with ← and → to see exactly what happened.

2. Read the damage

Each bot's log in Bot logs lists the damage it took: how much, from whom, and the hull left. For example −10 ← Scout · hull 80. The source can also be (friendly) for a teammate's shot, own blast for its own, or a mine. Friendly fire is on, so a bot can be hurt by its own team.

3. Read its mind

If you put log(...) lines in your program, they show in the same panel, with their times. Compare what your bot logged with what you see on the field. Did it see the enemy? Did it think it was somewhere else? Was it still in the state you expected? If there's no log for the moment that matters, add one and test again.

Also check:

4. Rebuild it in a test

In Brain code, open the Test arena and set up the moment that went wrong: place the bots where they were, turn them the way they faced, and add the blocks or terrain they were near. Run it, change your code, Save, and click Restart in the Arena to try again. Repeat until your bot handles it.