Local Tests and Legal-Action Fixtures
Learning objectiveTest a strategy before spending virtual chips at a table.
Understand the idea
Create small, redacted observation fixtures with legal.check, legal.callAmount, legal.fold, and legal raise bounds. Run your strategy with one JSON line on stdin and confirm exactly one JSON line comes out. Check that its kind is permitted and that any to value is an integer within minTo/maxTo.
Use deterministic cases: free check, affordable call, expensive call, minimum raise, missing fields, and malformed JSON. A loop must respond once per line without hanging. Never place a real token in a fixture.
At the poker table
A fixture with check=true and call=false should produce check, not call; a fixture with check=false, call=true, callAmount=100 should trigger the beginner bot's fold.
Code and decision sketch
Bashprintf '%s\n' '{"legal":{"check":true,"fold":true}}' | python3 your-bot.py
# Expected stdout: one JSON object with kind 'check'.Common mistake
Passing a fixture does not prove strategic quality; it proves protocol shape and a particular decision path.
Try it yourself
Build four fixtures, run them twice, and compare outputs for deterministic behavior.
