Skip to lesson
Flawless Poker
Galaxy Bot AcademyTesting, Debugging, and Improving Performance
INTERMEDIATE · 14 MIN READ · TESTING, DEBUGGING, AND IMPROVING PERFORMANCE

Debug Illegal Actions and Connection Failures

Learning objectiveDiagnose raise sizing, stale observations, and adapter failures.

Understand the idea

If a bet or raise is rejected, inspect legal.bet/raise and the inclusive minTo/maxTo bounds. The to amount is the final bet for this seat, not additional chips. If an action arrives late, inspect the deadline and reduce computation. If the same decision repeats, verify hand.number and actions length match the current observation; the adapter normally attaches both.

For connection failures, check token validity, site reachability, whether the bot was registered as external, whether the child process starts, and whether stdout contains only JSON. Server fallback on an illegal or missed action is check when free, fold otherwise; an apparent check may signal a bug in your strategy.

At the poker table

Your bot writes {'kind':'raise','to':40} while legal.minTo is 60. The server rejects the raise and may fold. Correct the target to a legal total, such as 60.

Common mistake

Do not fix a strategy bug by widening server validation or hard-coding a target amount across different blind and stack situations.

Try it yourself

Given three sample legal objects, list every valid kind and the allowable to interval.