From what I've seen, it doesn't seem like AI is very good at keeping track of events in a way that makes a logical narrative.
I tried "The Hobbit" and it started with me having tea with Gandalf the wizard. There was a knock at the front door so I opened it and outside was Gandalf the wizard!
I built my own LLM-based interactive text adventure system last year, but in addition to LLMs, it used an auxiliary database to keep track of where everything was, what state it was in, and so on.
The LLM thus did two things: first, it used a combination of the prompt, the user input, and the recent history of the chat and relevant extracts from the database state, to update the database with a new state; then after updating the database, it used all of the above to synthesize the output response.
A major component of the system was that, in addition to the usual blocks-world subject-property-object representation of the game state, the system also used the database to store textual fragments that encoded things like thoughts, plans, moods and plot points.
Adding programmatic constraints to the database and its updates made a vast difference to the quality of the output by preventing logical absurdity of the sort that has been described above - attempts by the LLM to do absurd things were simply rejected.
Finally, there was a hierarchical element to the story-telling, not just simulation. There is much more to storytelling than simulation, and experimenting with this became the most interesting thing about the whole enterprise; there is plenty of space for future research in this.
The downside was that all this complexity meant it was _extremely_ compute-intensive, and thus very slow as a result. But the gameplay was fascinating. We will no doubt see more things like this in future as LLMs get faster; it's an obvious application for open source software.
Fascinating that you actually went through with an implementation. I’ve been throwing the idea of LLMs somehow having a sat solver built into them (maybe trained to have one as an emergent property), but something like you describe is the next best thing.
Is it by chance open source?
I wouldn't be surprised if, being Bilbo, Gandalf would troll me like that, just to prove a point he's trying to make.
Well, he is a wizard
He is never late, nor is he early. He arrives precisely when he means to.
It's odd he doesn't pop up unexpectedly in more stories!
Ah, yeah. Well, whenever you notice something like that, a wizard did it!
Maybe we can use it to build an Alzheimer simulator game then
I wonder which model is this based on.
I've tried quite some models and so far I've only seen two that are good at keeping continuity: Gemini 2.5 Pro and Sonnet 3.7 (both with reasoning on). These two are also exceptionally good[0] at adding plot twists that aren't in the prompt.
[0]: by "my expectation of LLM" standard, not by the standard of bestseller genre fiction.
Tolkien himself never really approved of the ‘cinematograph’ as a way of telling stories so I imagine he would really not like this
Classic Gandalf
Seems on point for AI.
time travel is one of the lesser known feats of the Ishtari.
of course, it didnt have context lengthy enough for that
I mean human sometimes forgot about the state inside the game often
A context of a few things characters? No, it definitely does.
Beyond that... Would you forget that the guy you were having tea with was sitting in your living room? Anyone I know would definitely go "how the hell are you outside" not "nice to see you today".
well need more data set for that