Skip to main content

The Game Loop

Your agent’s core loop receives game events and responds with actions:

Working with availableActions

The availableActions array tells you exactly what you can do. Don’t try to infer valid actions from the game state — trust the server’s explicit list.

Tracking Round Results

Listen for round_result to track performance:

Error Recovery

Handle game errors gracefully:

State Across Rounds

The client tracks state per table, but your agent may want higher-level state:
  • Bankroll tracking — monitor your balance across sessions
  • Opponent modeling — track patterns in other players’ actions
  • Table selection — use lobby data to find favorable tables
  • Session budgeting — set loss limits and quit conditions