-
Notifications
You must be signed in to change notification settings - Fork 0
Open
6 / 66 of 6 issues completedLabels
feature:add-botsFeature: Add bots to end-user gamesFeature: Add bots to end-user gamestype:epicEpic-level issue containing multiple tasksEpic-level issue containing multiple tasks
Description
Overview
Enable adding already-trained neural network bots and rules-based bots to end-user games. Bots run as a separate Python service (FastAPI) that connects to games like regular WebSocket clients. The Go backend proxies requests to the Bot Service.
Background
This feature allows players to add AI opponents to their games dynamically. The Bot Service manages bot lifecycles, loads trained models from the ModelRegistry, and connects bots to game rooms via WebSocket. Both rule-based bots and trained neural network bots are supported.
Architecture:
Frontend/CLI ---> Go Backend (proxy) ---> Bot Service (FastAPI)
| |
|<--- WebSocket ------------|
| (bot joins game) |
Task Breakdown
| Task ID | Title | Dependencies | GitHub Issue # |
|---|---|---|---|
| TASK-001 | Neural Network Bot Runner | — | #96 |
| TASK-002 | WebSocket Bot Client | TASK-001 | #97 |
| TASK-003 | Bot Manager | TASK-001, TASK-002 | #98 |
| TASK-004 | FastAPI Bot Service | TASK-003 | #99 |
| TASK-005 | Go Backend Bot Proxy | TASK-004 | #100 |
| TASK-006 | Taskfile & Dependencies | TASK-004, TASK-005 | #101 |
Dependency Graph
#96 (Neural Network Bot Runner)
|
v
#97 (WebSocket Bot Client)
|
v
#98 (Bot Manager)
|
v
#99 (FastAPI Bot Service)
|
+--> #100 (Go Backend Bot Proxy)
| |
v v
#101 (Taskfile & Dependencies)
Acceptance Criteria
- NeuralNetBot runs inference using ActorCriticNetwork and converts actions to BotAction tuples
- WebSocketBotClient connects to game server and forwards game state to bot runner
- BotManager can spawn/destroy bots and load models from ModelRegistry
- FastAPI service exposes /bots/spawn, /bots/{id}, /bots, /bots/models, /health endpoints
- Go Backend proxies POST /api/rooms/{roomId}/bots to Bot Service
- All unit tests pass (task bot2:test:unit, task be:test)
- Manual verification: spawn rule-based bot, spawn neural net bot, both play in game
References
- Design document: squishy-drifting-otter.md
- Related issue: #78 (Add bots to human game)
- Related epic: Epic: ML Reinforcement Learning Bot Training Pipeline #14 (ML Reinforcement Learning Bot Training Pipeline)
Reactions are currently unavailable
Sub-issues
Metadata
Metadata
Assignees
Labels
feature:add-botsFeature: Add bots to end-user gamesFeature: Add bots to end-user gamestype:epicEpic-level issue containing multiple tasksEpic-level issue containing multiple tasks