Roadmap

# Poker Bot & Live Server Roadmap

Updated 2026-06-23.

---

## Phase 1: Simulation Testbed ✅ COMPLETE

- ✅ Simulation engine (`holdem_core`) — cash games, SNG, MTT
- ✅ Strategy framework — trait-based composition, 15 registered strategies
- ✅ Gen 1 strategies — static rules for preflop and postflop
- ✅ Configurable thresholds — 82 PostflopThresholds fields with TOML overrides
- ✅ A/B testing infrastructure
- ✅ Experiment GUI (`holdem_gui`) — web-based parameter sweep tool
- ✅ `hand_replay` crate — PT3/PokerStars parser + bot decision replay/regression

---

## Phase 2: Gen 3 Development ✅ COMPLETE (in production)

- ✅ Range-aware equity — `HandRange::init_opponent_range`
- ✅ Monte Carlo multi-way equity engine
- ✅ Weighted decision scoring — dynamic threshold adjustments
- ✅ 15 Gen3Config parameters
- ✅ **Production baseline** — `cash_nl.toml` = `ng_preflop` + `g3_postflop_rollout`
- ✅ Parameter sweep results (19 params × 2 directions × 2 scenarios)
- ✅ hand_replay validation — 27.3% mismatch rate (all passive; B7 root cause identified)

**Still tuning:**
- 🔄 B7: bet_adj_cap too high (bot too passive postflop)
- 🔄 B8: num_callers inflation bug
- 🔄 B9: preflop too tight for premiums in SB

**Pending (Gen 4 direction):**
- [ ] RangePredictor — per-opponent range tracking from observed actions
- [ ] Port missing Java tactics (backAlleyMug, luringBet, scareCardHit)
- [ ] Board texture awareness (connected/monotone/paired detection)

---

## Phase 3: Live Integration (Torn) 🔄 ACTIVE

**Status: Functional — playing live hands.**

### Completed
- ✅ Event-stream protocol (`poker_protocol::TableEvent`) — game_start, deal, player_action, waiting_for_action, win, showdown, game_over
- ✅ `live_server` (Axum gateway) — per-table state machine, bot auto-detection, inline decisions
- ✅ Torn TamperMonkey scraper — DOM parsing (seats, stacks, cards, actions, blinds, dealer)
- ✅ **Dealer button detection (D4)** — three-layer fix: SB-seat derivation + DOM chip confirmation + server-side correction
- ✅ Blind detection + synthesis (SB/BB/ante, fallback amounts)
- ✅ Action parsing (check/fold/bet/raise/call, raise-by vs raise-to)
- ✅ Pot/stack/wager tracking
- ✅ Hand history logging (PokerTracker-style + per-hand files)
- ✅ Auto sit-in / buy-in
- ✅ Decision delay randomization (1-5s)
- ✅ k/M suffix parsing (U3 fixed)
- ✅ seenTexts clearing across hands (U1 fixed)

### In Progress
- 🔄 Bot strategy tuning vs live play (B7/B8/B9 — see Open Issues Tracker)
- 🔄 Opponent modelling (no per-player range tracking yet — Gen 3 uses generic ranges)

### Pending
- [ ] U4: Player names containing "flop"/"turn"/"river" misclassified
- [ ] U5: `clickWhenReady` retry doesn't re-validate hand ID
- [ ] U6: Events lost on observer re-attachment
- [ ] D1: Missing ante events (chronic) — pot undercounted
- [ ] Multi-table support
- [ ] Native desktop scrapers (deferred)

---

## Phase 4: Reinforcement Learning (future)

Not started. Depends on Gen 3/4 opponent modelling maturity.

---

## Key Metrics (2026-06-23)

| Metric | Value |
|--------|-------|
| Registered strategies | 15 |
| Production bot | Gen 3 (ng_preflop + g3_postflop_rollout) |
| Live integration | Torn — functional, tuning |
| Total tests | 345+ |
| Hand replay mismatch | 27.3% (all passive — B7) |

id: 47031623e2c6451fb36730ffe93380ea
parent_id: 2c8da247905946c3aa19eb4936e16323
created_time: 2026-05-31T10:37:02.831Z
updated_time: 2026-06-23T14:28:54.328Z
is_conflict: 0
latitude: 0.00000000
longitude: 0.00000000
altitude: 0.0000
author: 
source_url: 
is_todo: 0
todo_due: 0
todo_completed: 0
source: joplin-desktop
source_application: net.cozic.joplin-desktop
application_data: 
order: 1780223822831
user_created_time: 2026-05-31T10:37:02.831Z
user_updated_time: 2026-06-23T14:28:54.328Z
encryption_cipher_text: 
encryption_applied: 0
markup_language: 1
is_shared: 0
share_id: 
conflict_original_id: 
master_key_id: 
user_data: 
deleted_time: 0
type_: 1