Open Adventure × LLM

CaveBridgeA real world behind natural language.

Play the 1977 classic Colossal Cave Adventure by simply talking. The LLM understands and narrates; the original deterministic C engine still owns every room, item, puzzle, death, and score.

CaveBridge, a natural-language interface over a deterministic text adventure engine
The design rule: promote the old engine to a verifiable world model; demote the LLM to a language interface.
2bounded LLM rolesunderstand player intent and narrate engine output
100+regression testsupstream engine regression suite remains intact
3desktop platformsprebuilt Windows, macOS, and Linux releases

Freedom without hallucinated worlds

LLM games offer open-ended language but often drift. Classic narrative games preserve a real designed world but force players through rigid parsers or narrow menus. CaveBridge joins the two.

01

Talk naturally.

Say “grab the lamp and light it,” “take everything,” or “follow the stream until the grate.” No exact VERB NOUN incantation required.

02

The world cannot drift.

The C engine — not the LLM — decides state transitions. The model cannot invent a room, conjure an item, rewrite a rule, or secretly move the player.

03

Everything is auditable.

Turn on /raw to inspect the canonical command and the engine’s exact response behind every narrated turn.

The LLM is the doorman, not the god.

CaveBridge makes a small build-gated interface patch to Open Adventure so external programs can read authoritative state, drive commands, and autosave. The default engine behavior and test suite stay intact.

All exits, loops, inventory changes, puzzle outcomes, and danger conditions are resolved from engine state — never guessed.

free-form player text · any language
LLM intent parser → canonical Adventure command(s)
original C engine → authoritative state transition
raw engine text + state snapshot
LLM narrator → grounded Dungeon-Master prose

See the bridge in action

Ask where you can go, combine several actions in one sentence, or set a goal and let auto-advance stop when the engine reports success, danger, or a stall.

Modern conveniences, explicitly optional

The project modernizes interaction without pretending those conveniences are part of the 1977 rules. Purist mode turns them off.

Any-language narrationSwitch with /lang; the built-in guide ships in English and Chinese.
Penalty-free savesAutosave every turn and use named slots with /save and /load.
Multi-step commandsTranslate one natural request into a bounded sequence of real engine actions.
Auto-advanceContinue toward a described goal until the grounded stop judge sees completion, risk, or no progress.
Hints only by consentAsk once with /hint or opt in with /hints on; no unsolicited spoilers.
Purist mode/purist on keeps only translation and narration: one action per turn, no loops, no hints.

Download and start talking

Prebuilt releases need no Python or compiler. On first launch, enter any OpenAI-compatible endpoint — local LM Studio, Ollama, vLLM, or a hosted provider.

# build from source on Linux / macOS
make CFLAGS="-DADVENT_AUTOSAVE"
uv venv && uv pip install pyyaml openai
uv run python -m cavebridge

# then, in game
/lang zh
/raw on
拿起灯,点亮它,然后往北走
“The original engine stays the world. The LLM just helps you talk to it.

Project links

CaveBridge is free and open source under BSD-2-Clause, preserving the upstream Open Adventure license and attribution.