one dataset · paper, tables, graph, wiki
simgrammar the grammar of simulation

in the book

the chapter this episode follows

chapter 11 3,569 words about 16 min 18 records

What breaks

In this chapter: The same inputs, the same world · Where the computation happens · Contradiction · Opaque replacements · The bill · Latency · Steering and checking · Trust, authorship, and safety · Provenance · Labor and safety · Risks the bets name · A log as the fix · Exercise: trace a failure.

read the chapter →

games in this episode

4 on screen, in order of appearance
Factory / automation
2013 · factory / automation

Factorio

A factory automation game in which the player builds belt, train, robot, and circuit networks that mine, refine, and assemble items on an alien planet while pollution provokes native biters that evolve over time.

on screen 1:05

AI-native
2024 · ai-native

Infinite Craft

A browser crafting game in which combining any two elements yields a new element whose name and emoji a language model generates on first request and a shared database then fixes for all players.

on screen 1:37

City builder
2020 · city builder

Townscaper

A town-building toy in which clicking colored blocks onto an irregular grid lets a wave function collapse solver assemble houses, arches, stairways, bridges, and gardens, with no goals or resources.

on screen 1:45

AI-native
2019 · ai-native

AI Dungeon

A text adventure in which a large language model continues the story after each player input, so actions, dialogue, and world facts the player types are improvised into narration rather than resolved by authored rules.

on screen 4:48

mechanics in this episode

3 on screen, in order of appearance
Conveyor transport
logistics & networks

Conveyor transport

Items move continuously on belts or lanes with throughput limits, splitters, merges, and priorities.

on screen 1:05

Causal breakdown tooltips
information & legibility

Causal breakdown tooltips

Hovering a derived value shows the named modifiers that produce it, and terms inside the tooltip can be hovered in turn.

on screen 2:54

Traffic congestion
logistics & networks

Traffic congestion

Trips route over a capacitated network; volume beyond capacity raises travel time and delays services and deliveries.

on screen 3:10

techniques in this episode

7 on screen, in order of appearance
Monte Carlo tree search for game AI
game-theoretic solvers · 2006 · shipped (niche)

Monte Carlo tree search for game AI

A best-first search that grows a game tree from repeated simulated playouts and picks branches with a bandit rule such as UCT, letting AI players plan from a forward model without a hand-tuned evaluation function.

on screen 0:27

Genie foundation world models
generative world model · 2025 · prototype

Genie foundation world models

Google DeepMind's Genie models generate playable worlds from a text or image prompt and render them in real time from player input, with Genie 3 reaching 720p at 24 fps and about a minute of visual memory.

on screen 1:28 · 3:44

Wave Function Collapse and constraint-based tile generation
procedural content generation · 2016 · shipped (niche)

Wave Function Collapse and constraint-based tile generation

An example-driven constraint solver that fills a grid by repeatedly collapsing the lowest-entropy cell to one tile and propagating adjacency constraints, shipped in games including Townscaper, Bad North, and Caves of Qud.

on screen 1:45

Neural rendering in the graphics pipeline
neural rendering & 3d generation · 2025 · shipped (mainstream)

Neural rendering in the graphics pipeline

Small neural networks inside the renderer upscale frames, generate extra frames, denoise ray tracing, decode compressed textures and layered materials, and since DLSS 5 re-light the final frame, all without touching simulation state.

on screen 1:52

LLM game master and narrative director
llm narrative & dialogue · 2019 · shipped (niche)

LLM game master and narrative director

A language model that adjudicates player and NPC intentions, decides outcomes, generates events and quests, and narrates them, either free-form or checked against a typed world state and canon.

on screen 2:24

On-device small language models for characters
inference efficiency · 2025 · shipped (niche)

On-device small language models for characters

Pruned, distilled, and 4-bit quantized language, speech, and embedding models that run on the player's GPU beside rendering to drive character decisions, dialogue, and voice without per-token server cost.

on screen 3:49

Grammar-constrained decoding for valid game actions
llm agents · 2024 · research

Grammar-constrained decoding for valid game actions

Decoding that masks every token which cannot extend a valid string of a schema, regular expression, or grammar, so a model's output always parses as a legal game action or data record.

on screen 5:48

opportunities in this episode

1 on screen, in order of appearance
horizon 1-2 years
horizon 1-2 years · impact 4 of 5

Event-sourced simulation runtime

An engine layer that records simulation and model calls as an append-only event log, giving replay, forking, explanation, and determinism for games with AI components.

on screen 6:14

shorts from this episode

1 · under a minute each
Short 10: The faster computer, opening frameplay · 0:35
rendered · short-10.mp4 · drawn from the dataset

short 10 0:35 from chapter 11 · episode 10

The faster computer

A faster computer can break a multiplayer game when the AI opponent thinks by the clock.

transcript

every number checked against the dataset when the episode was rendered
read the transcript, scene by scene · 10 scenes

Cold open

Two players, one computer opponent, and a game that keeps both machines in step by sending only orders. The opponent gets a fixed slice of time to think before each move. One machine is faster, so in the same slice it thinks further, and on one move it picks something different. For a few seconds the two worlds look fine. Then they compare notes, and the match is over.

The fix was one line

The opponent in that match plans with Monte Carlo tree search, and the dataset's record for the technique lists exactly this failure: a search that stops by the clock returns different moves on different hardware, which breaks replays and lockstep multiplayer. The fix is to count playouts instead of milliseconds and seed the random numbers. Then every machine computes the same move, which is why the record calls the technique mitigable.

Simulation games need some things most software doesn't: the same inputs have to make the same world, everything a player sees is evidence about how the game works, and one purchase has to pay for hundreds of hours.

Same inputs, same world

Factorio's record notes that items move in fixed, discrete steps, and that's what lets its multiplayer run identical worlds on every machine. The same property gives you replays, bug reports a developer can reproduce, leaderboards you can trust, and saves that load into the world you saved.

Of the techniques in the dataset that can run while you play, 10 break that property outright. Frame-generating world models, language-model game masters, societies of language agents, realtime voice: each samples its output, and its output decides what happens next.

Infinite Craft, from episode 7, stores each answer the first time a model gives it, so every player after that gets the same one.

Townscaper fits its houses together with a deterministic algorithm, wave function collapse, so the same clicks always build the same town. Neural upscaling and frame generation never touch the simulation at all; they work on the picture after the game has decided everything. That's part of why they're the one learned technique that has become normal in games, and the dataset marks them as leaving reproducibility intact. Of the 42 bets in the last episode, 17 lean on at least one technique that breaks reproducibility, so each of those needs a plan for it.

Contradiction

A gap in a simulation is survivable. A contradiction teaches the player something false. Episode 7 showed a language model getting the state of a text game wrong close to half the time. A diffusion model trained on Counter-Strike footage lets the player jump again in mid-air, which the real game never allows [1]. In one playtest, players reported language-model characters forgetting what they had said earlier in one report out of ten [2].

Asked to predict what the simulation will do, it's wrong often enough to mislead. Asked to describe what the simulation did, from a log of events the simulation computed, it has the answer in front of it.

Opaque replacements

Deep simulations are already hard to understand. Designers built a whole family of mechanics, overlays, inspectors, tooltips, chronicles, whose only job is to explain the rest. A learned component can undo that work. A trained policy can run traffic or set a rival's prices well and still give no reason for anything it does. The dataset lists legibility as a risk on 9 techniques. The cheapest remedy is the same every time: write down what the component decided, and on what inputs.

The bill

Most simulation games are bought once and played for a very long time, and a feature that calls a model every few seconds turns each of those hours into a cost. The 25-agent town behind the generative agents paper cost thousands of dollars in model credits [3]. When Google opened its Genie 3 world model to subscribers, each world was capped at sixty seconds because of limited compute [4].

At the other end, a two-billion-parameter character model can be squeezed into about one and a half gigabytes of graphics memory, beside the game's own rendering [5] [6]. Running it on the player's machine moves the cost to their hardware, though NVIDIA's in-game inference kit still asks for at least an RTX 30-series card with eight gigabytes [7]. In between, caching helps: a later study cut the tokens for that same 25-agent town to under half by replaying stored plans [8].

Steering and checking

The risk the dataset records most often across its techniques is controllability: the designer can't reliably make the technique do what the design needs. It's on 34 of them. Language-model game masters tend to go along with requests a human game master would refuse [9]. Close behind comes evaluation: when a system can produce endless variations, nobody can check them all. Automated playtests can say a generated event is valid and balanced. They can't say it's any good.

Trust

In 2021, AI Dungeon's new content filter flagged innocent stories, human moderators read players' private stories, and players review-bombed the game [10]. The video game actors' strike that ran from July 2024 to July 2025 ended with rules requiring consent for AI voice replicas [11]. Steam now asks developers whether their AI content was made before release or is generated while you play, and asks the second kind to describe their guardrails [12]. The bets that explain a game or let players write more of it replace nobody's work. The bets that replace writing, voices, or art carry the whole weight of those questions.

A log as the fix

Record every change to the game as an event, including the changes a model decided, and treat the log as the source of truth. In the desynced match, the opponent's move would have been decided once and sent to both machines. A replay reads the logged answer instead of asking the model again. A bug report carries the log. And the "why?" button from the last episode cites it.

A second tool limits what the model can write in the first place: constrained decoding only lets it produce output that fits a schema, so every action it proposes is one the engine can carry out. A hosted version followed a complex schema every time in testing, against under forty percent for an older model without it [13]. Strict formats cost some reasoning accuracy [14], and the dataset hasn't found a shipped game that documents using it.

Close

The event-log bet carries its own prediction: an engine, a middleware vendor, or an open-source project ships a replay layer built for games with generative parts by the end of 2028. Until then, the techniques that leave the simulation reproducible, upscaling, cached rules, deterministic generators, are already shipping. The next episode is about how predictions like that one get checked, and who's allowed to check them.