thebotslam

Testing and debugging

How do I see what my bot's program is doing?

Add log(...) lines to your program: each one writes a line to that bot's log, which shows in Bot logs under the field in the Arena as the match plays. A log costs no cycles and never changes the match, so you can leave as many in as you like. In Brain code, the line under the editor shows whether your code compiled, and Generated assembly shows what it became.

Read the full answer, step by step