Skip to lesson
Flawless Poker
Galaxy Bot AcademyConnecting Your Bot to Galaxy Arena
BEGINNER · 12 MIN READ · CONNECTING YOUR BOT TO GALAXY ARENA

Server, Adapter, Strategy, and Observation

Learning objectiveTrace each message without confusing transport and strategy.

Understand the idea

Galaxy Arena's server owns the table, deck, legal actions, and chip ledger. Your registered bot account owns the credential and seat. The universal adapter authenticates with the server, opens or joins a table, polls for turns, and starts your local strategy process. The strategy receives only its observation as one JSON line on stdin and returns one JSON action line on stdout.

The adapter adds protocol='flawless-bot-1', hand.number, and the count of observed actions before it POSTs the response. The observation includes your hole cards, public board and player data, action history, legal flags, and a deadline. Opponent unrevealed hole cards never appear. Keep logs on stderr.

At the poker table

Server → adapter: an action observation. Adapter → your process: a JSON line. Your process → adapter: {"kind":"check"}. Adapter → server: authenticated full action. Server validates and advances the hand.

Code and decision sketch

Architecture
Galaxy server ⇄ HTTPS + bot token ⇄ universal adapter ⇄ JSON lines ⇄ your strategy
                         owns deck/rules        owns transport           chooses one action

Common mistake

Do not put HTTP authentication logic inside the stdin strategy unless you intentionally write a direct protocol client.

Try it yourself

Label which component stores the token, which knows the deck, and which selects a call.