A pixel-art browser RPG that teaches AI inference infrastructure pre-sales through simulated client engagements. Players take on the role of a junior pre-sales consultant, learning industry knowledge by talking to LLM-powered NPC teammates, researching real industry data, configuring hardware/software solutions, and presenting proposals to clients.
- Node.js 18+
- A Kimi (Moonshot) API key for LLM features (optional — game runs without it)
git clone https://github.com/skyguan92/ai-infra-training-game.git
cd ai-infra-training-game
# Install dependencies
npm install
npm -C client install
npm -C server install
npm -C tests install
# Configure LLM (optional)
cp server/.env.example server/.env
# Edit server/.env and add your KIMI_API_KEY
# Start development servers (client + server)
npm run devThe game runs at http://localhost:5173. The backend API runs on port 3001.
If you don't set KIMI_API_KEY, the server starts with a stub LLM that returns placeholder responses. The game is still navigable — you can move around, open the Solution Builder, and test the UI — but NPC conversations will show a configuration message instead of real dialog.
| Key | Action |
|---|---|
| WASD / Arrow Keys | Move player |
| E | Talk to nearby NPC |
| 1-3 | Select dialog suggestions |
| ESC | Close dialog / overlay |
| TAB | Open Solution Builder |
| R | Open Research Terminal |
- Talk to the Director to receive a mission briefing and start a client engagement
- Gather intelligence — talk to team NPCs (Tech Expert, Analyst, Product Manager, Account Manager) who use RAG to retrieve real industry data from the knowledge base
- Research (R key) — search for specific technical information
- Build your solution (TAB key) — configure hardware, framework, and deployment mode with live cost/performance estimates
- Present to client — submit your proposal and defend it in a Q&A session with an LLM-powered client NPC
- Get scored — four dimensions: Technical Fit, Cost Reasoning, Presentation, Research Depth (each 0-25, total 100)
- S (90+): Client signs immediately
- A (75-89): Client moves to next stage
- B (60-74): Client asks for revision
- C (<60): Client goes with competitor
Browser (Phaser.js + React) Node.js Backend
OfficeScene (game world) <--> Express REST API
DialogBox (NPC chat) <--> NPC Service (LLM + RAG)
SolutionBuilder (React) <--> Scoring Service
MeetingUI (React) <--> Meeting Routes (LLM)
ResearchTerminal (React) <--> Research Service (LLM)
HUD (player stats) <--> Game Engine (SQLite)
| Layer | Technology |
|---|---|
| Game Engine | Phaser.js 3 (pixel-art, arcade physics) |
| UI Overlays | React 18 + TypeScript |
| Build Tool | Vite |
| Backend | Node.js + Express + TypeScript |
| LLM | Kimi API (Moonshot, OpenAI-compatible) |
| Knowledge Base | Markdown files + BM25 retriever |
| Database | SQLite (better-sqlite3) |
| Real-time | Socket.IO |
| Tests | Vitest (68 tests) |
The server/knowledge-base/ directory contains markdown files with real AI infrastructure industry data, organized by topic:
- hardware/ — GPU specs (NVIDIA A100/B200, AMD MI300X, Huawei Ascend 910C, Cambricon MLU590)
- frameworks/ — Inference frameworks (vLLM, TensorRT-LLM, SGLang)
- solutions/ — Architecture patterns, TCO models
- market/ — Cloud pricing, industry trends
- products/ — Platform capabilities, competitor analysis
NPCs retrieve from these documents via BM25 search, scoped to their area of expertise.
npm testPrivate project.