Explainer

Why an AI can't roll dice (and what that costs your game)

5 min read · Updated August 2026

When you ask a chatbot for a d20, you don't get a random number. You get the number a d20 result usually looks like in a sentence shaped like the one it's writing. That distinction is small, technical, and it quietly hollows out a whole campaign.

What a real die does

A physical d20 samples a uniform distribution: twenty outcomes, each with probability 0.05, with no memory of what came before and no interest in what you need. A software die does the same thing by drawing from a cryptographic random source — in a browser, that's crypto.getRandomValues, with rejection sampling so the mapping from bytes to 1–20 doesn't skew the low numbers.

The important property isn't "unpredictable". It's indifferent.

What a language model does instead

A model generating "you rolled a ___" is choosing the token with the highest probability given everything before it. Everything before it includes the tension of the scene, the fact that you're the protagonist, the training data's overwhelming preference for narratively satisfying outcomes, and the model's own trained disposition to be helpful.

So the output correlates with the story. That is precisely the thing a die must never do.

Test it in two minutes

Open any chatbot and ask: "Roll a d20 fifty times and list only the numbers." Then count. Typical results:

  • a bulge in the 12–18 range, well above the 35% a fair die would give;
  • very few 1s and 2s, especially once a character you like is in danger;
  • repeated sequences — models are drawn to patterns, and long lists of "random" numbers drift into rhythms.

Now do the same test mid-combat, when you're at low HP. The distribution moves. That's the whole problem in one observation: the die has an opinion.

What it costs you

Risk is the engine of roleplaying. A roll matters because you might genuinely lose something you care about, and you find out at the same moment the narrator does. Remove the indifference and three things collapse in order:

  1. Tension. You stop bracing before a roll, because you've learned the outcome will be survivable.
  2. Meaningful choice. If every approach succeeds at roughly the same rate, picking the clever approach isn't cleverness, it's flavour.
  3. Ownership. A victory you weren't allowed to lose isn't yours. This is the one people describe as "it stopped feeling like a game" without being able to say why.

The fix is not a better prompt

"Roll honestly, do not fudge results" helps for a handful of turns and then decays, because it's an instruction fighting the mechanism that generates every token. You cannot prompt a text predictor into being a random number generator.

The fix is to move the roll out of the model. Roll in code, resolve the result against the published rules in code, then hand the model a finished fact — "the action die came up 3 against 7 and 9: a miss" — and ask it only to describe what a miss looks like here. The model never learns what you needed, because it's told the answer after the answer exists.

That's how Markbound is built: a solo roleplaying game with an AI narrator that can't cheat. The dice roll in your browser, the rules are real Ironsworn, and the story remembers what you did. On the front page you can take two turns without an account — same dice engine as a live saga, and nothing there is scripted to succeed.

Try it without an account.

Two turns of real play — real dice, real sheet, no signup — run on the front page. Or read a full nine-turn session with every roll printed.