A React app that simulates a Survivor-style reality TV show using AI-powered contestants. Twelve AI players scheme, form alliances, vote each other out, and compete to become the Sole Survivor — all autonomously driven by an LLM via the RocketRide SDK.
- Generates 12 unique contestants with distinct personalities, strategies, and backstories
- Runs autonomous game rounds, each with 4 discussion sub-phases (Camp Life → Reading the Room → Strategy Talk → Pre-Tribal)
- Players scheme publicly and privately — each contestant makes public statements, sends private messages to allies, and forms coalitions
- Jeff Probst AI host interrogates players at Tribal Council and provides post-elimination drama
- Alliance detection — the engine analyzes private message patterns to detect and display coalitions
- Voting and elimination — players vote concurrently each round; ties are broken randomly
- Node.js 18+
- A running RocketRide server
- An OpenAI API key (used by the RocketRide pipeline)
Install dependencies:
npm installThe app reads configuration from environment variables. Create a .env.local file in the survivor/ directory:
ROCKETRIDE_URI=http://localhost:5565
ROCKETRIDE_APIKEY=your-rocketride-api-key
ROCKETRIDE_OPENAI_KEY=your-openai-api-key| Variable | Default | Description |
|---|---|---|
ROCKETRIDE_URI |
http://localhost:5565 |
RocketRide server URL |
ROCKETRIDE_APIKEY |
(empty) | RocketRide authentication key |
ROCKETRIDE_OPENAI_KEY |
(empty) | OpenAI API key passed to the LLM pipeline |
The pipeline uses openai-4o-mini by default. To change the model, edit src/config.ts.
Start the dev server:
npm run devOpen http://localhost:3000, then click Start to begin a game.
Build for production:
npm run buildPreview the production build:
npm run previewApp.tsx
└── GameEngine.ts # Core game loop, all AI calls
├── RocketRideClient # Shared LLM pipeline (one pipeline, 12 player threads)
├── generatePersonas # Jeff creates 12 contestants via LLM
├── playerDiscussionTurn # Each player speaks publicly + schemes privately
├── jeffTribalCouncil # Jeff interrogates players before the vote
├── votingPhase # All players vote concurrently
├── processElimination # Tallies votes, eliminates player
└── detectAlliances # Infers coalitions from private message graph
Each round proceeds through these phases:
- Discussion (4 sub-rounds) — players make public statements and send private messages
- Tribal Council — Jeff Probst AI grills specific players based on what he observed
- Voting — all players vote concurrently; the player with the most votes is eliminated
- Elimination — Jeff announces the result and provides commentary
The game continues until one player remains.
All 12 players share a single RocketRide pipeline with 13 threads (12 players + Jeff). Each player maintains their own conversation history (capped at 16 entries) for continuity across rounds. The pipeline uses openai-4o-mini by default.
Key constants in src/config.ts:
| Constant | Default | Effect |
|---|---|---|
DISCUSSION_ROUNDS |
4 |
Number of discussion sub-rounds per game round |
DELAY_BETWEEN_PHASES_MS |
3000 |
Pause between phases (ms) |
MAX_HISTORY_ENTRIES |
16 |
Per-player conversation history window |