Divergentum · notes from the build

Freedom Without Rails

How to make a solo D&D game interesting without passing a linear story off as real freedom. The mechanics we built, broke, and rebuilt.

◆ Divergentum ↗ AI Dungeon Master Game design Prompt engineering Build in public
This is a build log from Divergentum — our solo D&D game run by an AI dungeon master.
Play Divergentum →

A solo roleplaying game run by an AI has two familiar failure modes, and both are boring in exactly the same way. The first is rails: the master tells their story, and your actions become set dressing for a scene that was always coming. The second is a sandbox with no intent: the master obediently reacts to everything, remembers nothing, and leads nowhere. The first lies about you deciding anything. The second promises nothing at all — which is precisely why, twenty turns in, nothing has happened.

We shipped both of them before we got here. What follows is specific: what actually broke, which mechanics we put in their place, and where we deliberately stopped. Everything described runs server-side in Divergentum — the player never sees any of this state, and that is part of the design too.

ITwo failures wearing different clothes

Rails and sandbox look like opposites, but they collapse at the same point: the player's action carries no weight. In the first case the script drives over it; in the second it has nowhere to land, because the world has neither memory nor intent. The only difference is who is bored: on rails you feel led, in the sandbox you feel abandoned.

RAILS SANDBOX HIDDEN DESIGN Player's turn no effect Fixed script The next scene freedom in name only Player's turn World with no intent The same old hook tavern — rumour — stranger Player's turn World with intent A scene that remembers Hidden design one step
Three ways to process a single turn. The difference is not how many options appear on screen, but what happens to the player's action next: it is ignored, it leads nowhere, or it moves a world that has an intent of its own — an intent that yields to it.

IIThe pattern comes from the prompt, not the model

The most expensive mistake we made was diagnostic. Campaigns kept degenerating into the same opening — a tavern, a rumour, a stranger at the next table — and the obvious first hypothesis was the model. Swap providers and the prose will come alive.

So we ran the direct test: one prompt, three different models, identical starting conditions. There was no difference in the manner of the telling. What came out of it was the opposite conclusion, and a far more useful one: the manner is dictated by the prompt. If all three models slide into the same tavern, the instruction is what's broken.

The real cause was in a counter. Our story clock advanced on "weighty" turns: a fight, a serious check, an event. A player who mostly talks and looks around produced nothing but minor turns — the counter never moved, and the campaign spun forever inside the first beat with its very narrow instruction: build atmosphere, do not rush toward conflict. The model followed that order faithfully. Forever.

We thought we were diagnosing the AI. We were diagnosing our own instruction.

IIIA rhythm, not a script

The first thing that separates a live table from a text generator is rhythm. A human master keeps it in their head: they know when to exhale, when to raise the stakes, when to let everyone breathe. We moved that rhythm into explicit campaign state — and deliberately not into plot.

An arc runs through six beats (the classic five-room dungeon, plus a slow opening). Each beat is a module of directives mixed into the master's prompt: what to do this beat, what is forbidden, which technique fits. The SLOW_BURN beat explicitly bans combat and loot and demands that one or two concrete details be planted for later. The ROOM_3 beat demands that the twist be fair: the clues must have appeared earlier, and the player's prior effort may never be voided — only redirected.

SLOW BURN entrance puzzle setback climax reward turns 0–2 3–4 5–6 7–8 9–10 11+ ARC COUNTER minor turn — talk, inspect, think the counter holds: the story keeps its breath until the player pushes something real weighty turn — a fight, a risk, an event the counter advances one beat a boss or epic event on turn 5 or later → a new arc
The beat governs the direction of a turn, never the content of the scene. Pacing belongs to the player: a conversation in a tavern can run as long as they like and the counter will not move. We deliberately do not force the arc forward after N minor turns — that would cure the symptom with coercion.

The crucial detail is the very one that betrayed us and, once fixed, became an advantage. Only weighty turns move the counter, not every exchange of dialogue. Which means the player owns the pacing: want to spend an hour drinking in a tavern, the story will wait. The problem was never the rule itself — it was that we had no content for a held breath. That is the next section.

IVThe hidden seed

The cure for our monotony turned out to be content, not machinery. On its first turn, every campaign draws a secret director's note: a myth — the hidden truth of this world — and four chapters that unfold as the player completes arcs. The player never sees it. The master is explicitly forbidden to retell the myth, summarize it, or dump it as lore.

Seed "The Pale Tithe" — chapter 1 of 4

Every seventh year the Pale Court pays its own debt downward, with a stolen mortal. Tithe-night is coming, and the chosen one is someone the hero has broken bread with: kept charming, kept close, kept unaware. A taken one can be pulled back only by being held through everything they are turned into.

Chapter 1: a beloved acquaintance with odd edges. Old-fashioned turns of speech. Never seen at dawn. Wears iron badly. (The role attaches to a character this story already established and the player already likes — never to a parallel new invention.)

This is not a plot to be played out. It is the direction the world drifts in when you are not pushing it. The weaving rules are what separate design from rails, and they are worth quoting in full:

That third line is this entire article in one sentence. The design outranks emptiness, but never the player. The difference between "the world is leading you" and "the world lives while you choose" is simply who yields when the two collide.

THE PLAYER'S PATH the player pushes elsewhere chapter 1 chapter 2 chapter 3 chapter 4 HIDDEN DESIGN — the player never sees this row one visible step the design waits
A chapter never drags the path toward itself — it slides a detail into the place where the player already stands. When the player goes elsewhere, no step is taken at all: the design has infinite patience, because it has no deadline.

The seed is not drawn blind

The library holds ten seeds built from public-domain material: the Fisher King, Tam Lin, Bisclavret, the Pied Piper, Marya Morevna. The draw is weighted by the hero's background: a soldier is three times more likely to pull the false-king story, a scholar the sleeper below, a criminal the debt at the crossroads. It is cheap personalization that costs the player no questionnaire — they simply notice that the story seems to be about them.

VThe agency lock

The subtlest form of rails does not live in plot structure. It lives in a single sentence. "You decide to check the door." "You realize it's a trap." "You feel you shouldn't trust him." Every one of those is the master playing your turn for you and handing back the result as description. Formally it isn't even plot linearity. Practically it is exactly that, in its ugliest form.

So the prompt kernel carries a hard lock. Describing the hero's decisions or thoughts is forbidden. Praising the player is forbidden — "great choice!" is a master flattering you instead of arbitrating. Moving the character somewhere they did not go is forbidden: listening, inspecting, talking, and thinking all happen exactly where the character stands.

That last one turned out to be startlingly hard. AI loves to accelerate a plot by teleport: the player listens to a distant scream and is suddenly standing under the dragon. The rule had to be written the way life works — the only way to move a hero against their will is physical. Seized and carried, knocked out, an explicit magical teleport. Everything else is an invitation: a track, a scream, a glow over the hill. The invitation goes into the action options, and the decision stays with the player.

From the master's prompt kernel

Hooks may invite movement: a scream outside, tracks leading away, a glow over the hill. Offer them as action options — the player decides whether to follow. Show the dragon's shadow, not the dragon.

The same principle governs the three action options that close every turn. Three variations of one move — attack, strike, charge in — are an imitation of choice. So the options must spread across the three pillars of play: combat, social, exploration. Each starts with a different verb. Each accounts for this specific hero's abilities. We measure violations of that rule with a dedicated detector — more on measurement below.

VIThe die that does not fold

There is one more species of fake freedom that gets discussed far too rarely: the master who folds. An AI is obliging by default. It wants you to feel good. Let it both narrate and roll, and it will quietly start rounding in your favour — and the world stops pushing back. Freedom without resistance is worthless: if losing is impossible, choosing decides nothing.

So we took the dice away from the master. Combat is resolved by the server: 54 monsters from the open SRD with real stat blocks, attack rolls, crits on 20, misses on 1, damage from honest formulas. The master narrates the attempt; the server decides the outcome. The same goes for the inventory: you cannot drink a potion that isn't in your pack — the hero reaches for it and finds nothing. And for limited resources: abilities have charges, and a spent ability stays spent until rest, however persuasively the player asks.

Freedom is measured not by what is permitted, but by whether the world is allowed to say no.

VIIMemory is the only visible proof

A choice the world does not remember is not a choice — it is an animation. So every turn the master may anchor a fact in world memory, stamped with the turn it was established. Then the mechanism we like most for its sheer cheapness kicks in: after five turns with no reference to the past, the server slips a directive into the prompt — raise one fact or character from memory into the scene. Not invent a past: use the one that exists.

Returning is handled separately. If the player has been gone a day or more, the first turn of the session opens with a single change that happened without them. One — not a cascade. And never a punishment for leaving.

Player away ≥ 24 h one change while they were gone pre-empts the memory nudge — one directive per turn, never two Master's turn fact World memory every entry stamped with its turn Callback counter 5 turns with no reference to the past Directive in the next prompt raise one fact or character into the scene if the directive is ignored, the counter holds and it repeats every turn
No new interface, no extra model calls, no database migrations. The whole mechanism is a counter and a line that is sometimes appended to the prompt. All the player sees is that the world remembers them.

VIIIHope and fear

We turned emotional rhythm into state as well, but carefully. Every turn carries a tone — hope or fear. Flip them every turn and you get a mechanical metronome, which reads worse than monotony. So the bar for intervening is simple: push for a change of tone only once a run has formed — at least two identical tones in a row. And after a flip the run resets, so the next turn is guaranteed to be free.

hope fear a run of two → push for a break a run of two → push for a break a single beat — no reason to act
Hope and fear alternating in the manner of Robin Laws, but with a threshold. The rule without a threshold gives you a tick-tock the player decodes in ten turns; the threshold leaves room for a scene's natural inertia.

IXFreedom has to be measured

Everything above is text instructions to a model, and a model is free to disregard them. So every turn writes telemetry: which kernel version, which modules were mixed in, which arc beat, how many tokens, what it cost — and, most importantly, how many violations the detectors found.

The detectors are simple and dull, which is exactly why they work. One scans the master's prose for banned agency phrases ("you decide", "you realize"). One checks whether the three action options actually diverge in type and verb. One counts whether the memory directive was honoured. That turns a question usually answered by taste into one answered by data: did the new prompt revision actually reduce the number of turns where the master played for the player — and by how much.

XWhat we deliberately do not do

XIThe contract

Boiled down to rules you can carry into any AI-master project of your own, it comes to seven lines.

1
The design must stay hidden. A visible plot turns into rails the moment the player recognizes it.
2
The player's action always outranks the design. Not "usually", not "where appropriate". The design has infinite patience; the player does not.
3
The world walks to the player, not the other way round. A step of the design is a detail arriving where they already stand.
4
Pacing belongs to the player. The story is allowed to hold its breath for ten turns if the player moves nothing weighty.
5
Nobody thinks for the hero except the player. No "you decide", no "you realize", no relocation without a physical cause.
6
Arbiter and storyteller are different jobs. Dice, inventory and ability charges are computed by code; the prose is written by the model.
7
Memory is the only visible proof of freedom. If the world doesn't hand your choice back five turns later, there was no choice.

Freedom in a solo game is not a count of doors on the screen. It is the confidence that somebody stands behind them, that they have plans of their own, and that your decision outweighs those plans rather than the reverse. Everything else is direction — and direction is only visible when it's done badly.

How to cite this article

Kharchuk, M. (2026). Freedom Without Rails: designing an AI dungeon master that feels free. Merowingus Studio. https://www.merowingus.com/blog/freedom-without-rails.html

@misc{kharchuk2026freedom,
  author = {Kharchuk, Mykola},
  title  = {Freedom Without Rails: designing an AI dungeon master that feels free},
  year   = {2026},
  note   = {Merowingus Studio · Divergentum build log},
  url    = {https://www.merowingus.com/blog/freedom-without-rails.html}
}
© 2026 Merowingus Studio · Mykola Kharchuk
HomeBlogSubscribe