Debugging
Bots run inside restricted containers, so visibility comes from structured logs and deterministic replays. Use the local runner and arena traces to triage issues fast.
Read the match log
- Each turn includes the request, your response, and the adjudicated action after validation.
- Timeouts show elapsed milliseconds; illegal actions list the fallback that was applied.
metadatafrom your responses is printed inline—keep it small and relevant.
Replay locally
- Download the trace JSON from the arena and run it through the local runner.
- Compare decisions with the same seed to confirm determinism.
- Turn on profiling to see which turns flirt with the timeout budget.
Detect illegal actions early
- Validate actions against the
legal_actionslist in each request before returning. - Clamp numeric values (bets, raises, bids) to the provided min/max range.
- Guard optional fields: if data is missing, default to a safe action like
foldorcheck.
Observability tips
- Log structured JSON with a unique turn key:
{"turn": <turn>, "action": <action>}. - Keep logs under a few KB per turn; excess output is truncated in the sandbox.
- Track the slowest 5 turns locally to pinpoint branches that need simplification.
Common culprits
- Dependency import time on cold starts—reduce heavy libraries or precompute tables.
- Stateful globals causing non-determinism across turns. Reset or scope tightly.
- Assuming network access. The sandbox blocks outbound calls; embed data in your build.