Debugging & Logs
Runtime Logs
The game engine captures standard output (stdout) and standard error (stderr).
- Stdout: Used for game communication.
- Stderr: Use
sys.stderrfor debugging information.
Common Errors
- Timeout: Your
act()function took too long. Optimize your code. - Memory Limit: You allocated too much memory. Avoid large global lists.
- Invalid Move: You tried to walk into a wall or another bot.
The Sandwich Strategy
If your bot is behaving strangely, check if it's dead. Dead bots cannot act. Check if you have Energy. Low energy bots cannot move.