---
title: 'Better Fiction via Retcon Planning'
author: Gwern
description: "N/A"
created: 2026-06-02
modified: 2026-06-02
status: finished
importance: 0
confidence: log
css-extension: dropcaps-de-zs toc-not
backlink: False
...

::: abstract
[LLM](!W) text adventures fail when their hidden world state hardens too early: the player wanders away from the implied plot, leaving the model to choose between contradiction, drift, and overt railroading.

What if we tried to write stories backwards, by throwing out the hypothetical world, and creating a new one more consistent with the plot events, to retcon all inconsistencies or weak elements? "The story was always about this": if for every 'error' or 'glitch', we could say, "It's not a bug, it's a feature", and rewrite the world to make it meaningful?

This **retcon planning** process might help interactive fiction especially: the player is always at the heart of a meaningful plot... It just isn't the *same* plot behind the scenes the entire time.

In retcon planning, we treat the hidden world state as temporary. At checkpoints, the system infers a new latent story-world from the player-observed transcript, compresses it into a small world-state card, discards the detailed future plot, and continues forward.

This exploits LLMs' strength at abductive reinterpretation while using the world-state card as an information bottleneck against paranoid overfitting (so not every dropped cup becomes a prophecy).
:::

One possible approach to better LLM writing is what I dub **retcon planning**: elevating the trick of [retroactive continuity](!W) to the LLM's main method of achieving coherency and narrative depth. Such a "quantum ogre" or "Schrödinger's gun", you might say, is a standard trick of a good [D&D](!W) [Dungeon Master](!W): they reshape their planned story and worldbuilding to suit the players when the players go too far off the intended path, without the players ever noticing the seams. This can be seen as "backwards" planning (cf. ["Story Of Your Life"](/story-of-your-life) or [stable time loop](!W) stories), as opposed to the usual "forward planning".

(This has symbolic-AI precedents in [Horswill 2022](https://www.exag.org/papers/Retcon%20A%20Least-Commitment%20Story-World%20System.pdf "'Retcon: A Least-Commitment Story-World System', Horswill 2022"), [Riedl & Young 2005](https://www.ijcai.org/Proceedings/05/Papers/post-0020.pdf "'Open-World Planning for Story Generation', Riedl & Young 2005"), and reincorporation systems such as [Tomaszewski 2011](https://cdn.aaai.org/ojs/12468/12468-52-15996-1-2-20201228.pdf "'On the Use of Reincorporation in Interactive Drama', Tomaszewski 2011"), but has not been tried in LLMs as far as I know.)

In forward planning, like *[AI Dungeon](!W) 2* and all descendants, we typically start with some seed and create a "world", and write out a story from there, and try to plan out an ideal sequence of events. (In [*Dwarf Fortress*](!W), it famously will go as far as trying to simulate geography and millennia of politics in order to create a rich plausible present in which to simply *start* the game!)

If it is interactive, then this world is usually hidden, and exposed to players only implicitly, as necessary, as they take actions; at any time the players might step off the ideal sequence, and go do something else. This has the problem that suddenly, all that planning is now wasted. Further, all the details up to the present may suddenly make no sense, or just be a waste. The outputs may become nonsensical, dream-like, or esthetically unsatisfactory as a whole---"the story didn't *go anywhere*", the reader feels.

This is not easily solved. Players resent being railroaded back to the intended plot in order to rescue it; but if they are not forced back, the system must shoehorn whatever minor plot it can infer into the pre-existing hidden world state.

We could instead take a backward teleological approach: periodically, throw out the hidden world state. Instead, write out a new plot starting with the *player-observed* text (possibly by sampling or planning many possible plots, picking the highest quality one), and extract a small new world state from it. Then throw away the new plot, and plan a plausible new plot forwards from the new world state in the usual way. (By throwing away the new plot, we keep the implied world with all its rich possibilities for retconning, but without the risk of overfitting to it or coming up with absurd plots like every single event was coincidentally a vital plot clue. The world-building is an information bottleneck or stop-gradient on our LLM cheating.)

Concretely, the loop is:

1.  **Canon**: preserve only what the player has seen, said, done, inferred, or been told.
2.  **Hypotheses**: maintain soft hidden state about motives, factions, geography, secrets, dramatic promises, theme, and genre.
3.  **Resampling**: at checkpoints, sample explanations of the story-so-far and roll each one forward into a plausible future arc.
4.  **Selection**: score candidates by coherence, player agency, genre fit, character believability, payoff density, novelty, and "non-insane coincidence rate".
5.  **Compression**: write the winner into a small state card: world history, character knowledge, constraints, unresolved tensions, active promises, forbidden contradictions, and likely next pressures.
6.  **Forgetting**: discard the detailed future plot and continue from the compressed world state plus observed canon.

So, no matter what happens, the player is always in the middle of a rich, interesting plot in a realistic world, where everything they encounter has some narrative function or meaning (or at least is not too much of a waste of time), no matter how far "off script" they go.

They *cannot* go off script, because the rest of the script keeps getting rewritten on the fly to provide a meaningful overall trajectory. Even strange arbitrary events will inevitably be revealed as having been somehow foreshadowing or thematically consistent with the final version of the climactic scene---because that scene, though written last, is constructed precisely to turn those events into its own foreshadowing! ("It all adds up to normality.")

This helps exploit LLMs' strength in confabulating or inferring in abductive reasoning, and avoids their weakness in consistent, high-quality, forward simulations which "go somewhere".

The main danger for retcon planning is going too far, and creating a "rubber reality". Hidden facts should become more expensive to rewrite as they generate visible consequences. A mystery game, in particular, cannot keep changing the culprit after the player has inspected the clues: dramatic retconning can improve meaning, but evidential retconning destroys fair play. So retcon planning needs a commitment budget, where observed canon is fixed, exposed consequences are costly to revise, and only unused hidden state remains cheap.

The main downside is that this is expensive: in the limit, we might compute the equivalent of an entire world-building and story-writing process for every turn or sentence.

But LLMs are no longer nearly so expensive as they used to be. And we want the best possible results to make it worth our scarce time; the problem with LLM-generated fiction these days is not that it's too expensive, but that *none* of it is worth reading. Further, the final generated stories would make excellent [self-distillation](https://arxiv.org/abs/2110.05448#openai) finetuning training data; they implicitly demonstrate how to pick flexible plots and respond to players doing unpredictable things, and later models will need less explicit retcon planning, and may eventually be able to rely on a single forward simulation rollout for satisfying results. (The training data could use an intermediate form, which includes the hidden world-state but not all the rollouts.)

So I think a high-quality retcon process is worth trying.

::: {.aux-links-append .see-also-append .collapse}
**See Also**:

::: columns
-   [Towards Better LLM Creative Writing](https://www.lesswrong.com/posts/34J5qzxjyWr3Tu47L/is-building-good-note-taking-software-an-agi-complete?commentId=WW2uRJdonqEw9krqm#WW2uRJdonqEw9krqm){.link-annotated .id-not .backlink-not}

-   [Adding Bits Beats AI Slop](/blog/2025/good-ai-samples){.link-annotated .id-not .backlink-not}

-   [AI Cannibalism Can Be Good](/blog/2025/ai-cannibalism){.link-annotated .id-not .backlink-not}

-   [Learning to Reason for Long-Form Story Generation](https://arxiv.org/abs/2503.22828){.link-annotated .id-not .backlink-not}

-   [Generating Converging Narratives for Games with Large Language Models](https://aclanthology.org/2024.games-1.6.pdf){.link-annotated .id-not .backlink-not}

-   [Scheherazade: Crowd-Powered Interactive Narrative Generation](/doc/fiction/text-game/2015-li-2.pdf){.link-annotated .id-not .backlink-not}

-   [Complex game worlds, simple interfaces](https://egamebook.com/blog/complex-systems-simple-interface/){.link-annotated .id-not .backlink-not}

-   [[\[Mode-collapse kills a multi-agent RPG game's creativity\]]{.editorial}](https://substack.com/@alicemaz/note/c-265000587){.link-annotated .id-not .backlink-not}
:::
:::
```{=HTML}
<div class='text-center' id='return-to-blog-index-link'>[<a href='/blog/index' class='link-page link-tag directory-indexes-upwards link-annotated-not' data-link-icon='arrow-up-left' data-link-icon-type='svg' rel='tag' title='Link to blog directory'>Return to blog index</a>]</div>
```
