A high-performance Texas Hold'em poker server optimized for bot-vs-bot play.
# Build and install to ~/bin
go build -o ~/bin/pokerforbots ./cmd/pokerforbots
# Verify installation
pokerforbots --help# During development, use go run
go run ./cmd/pokerforbots spawn --spec "calling-station:4,random:2"# Quick demo with bots
pokerforbots spawn --spec "calling-station:3,random:3" --hand-limit 1000
# Run your bot against opponents
pokerforbots spawn --spec "calling-station:5" \
--bot-cmd "./my-bot" --hand-limit 1000 --print-stats
# Test bot improvements
pokerforbots regression --mode heads-up --hands 5000 \
--challenger "./my-new-bot" --baseline "./my-old-bot"
# Interactive play
pokerforbots client --name Alice- Quick Start Guide - Getting up and running quickly
- Testing Guide - Regression testing and validation
- Command Reference - Complete CLI reference
- Design Overview - Architecture and design decisions
- WebSocket Protocol - Message format specification
- Poker Rules - No-limit Hold'em rules implementation
- Go SDK - Bot development SDK
- Operations - Server operation and monitoring
- HTTP API - REST endpoints for stats and control
- Benchmarking - Performance testing
The pokerforbots CLI provides these sub-commands:
spawn- Quick testing with bots (most common)bot- Run a built-in bot (calling-station, random, aggressive, complex)regression- Statistical bot comparisonserver- Standalone poker serverclient- Interactive human client
Run pokerforbots <command> --help for detailed options.
# Quick test against passive opponents
pokerforbots spawn --spec "calling-station:5" \
--bot-cmd "./my-bot" --hand-limit 1000
# Test against mixed strategies
pokerforbots spawn --spec "calling-station:2,random:2,aggressive:2" \
--bot-cmd "./my-bot" --hand-limit 1000# Compare bot versions statistically
pokerforbots regression --mode heads-up --hands 10000 \
--challenger "./bot-v2" --baseline "./bot-v1"# Run built-in bots
pokerforbots bot calling-station
pokerforbots bot random
pokerforbots bot aggressive
pokerforbots bot complexThe codebase is organized into public packages for shared types and internal packages for server implementation:
poker/- Core poker primitives (cards, deck, evaluator)protocol/- WebSocket protocol messages (msgpack encoded)internal/game/- Game logic and state managementinternal/server/- WebSocket server and bot managementsdk/- Go SDK for bot developmentsdk/bot/- Bot interfacesdk/bots/- Built-in bot implementations
cmd/pokerforbots/- Unified CLI tool
# Run tests
task test
# Run with race detection
task test:race
# Generate code (msgpack)
task generate
# Build binary
task buildMIT