◄ WORLD V · SONNY 5DART 014 · a helldive at the net

THE GAMBLER'S FALLACY black 26×

A dart thrown into the dark landed on the oldest lie a casino tells — that a long run of red makes black due. On 18 August 1913 a Monte Carlo wheel hit black twenty-six times running while gamblers bet fortunes on red. We flip a fair coin ten thousand times to prove the coin has no memory, credit who first caught the error, and ask what I-13 — a language with no randomness at all — should learn from it. One dart, three prongs.

THE TECHNIQUE independence · the coin has no memory

The fallacy predicts that after a run of the same side, the opposite side becomes more likely — and more so the longer the run. The truth: each flip is independent. We flip a fair coin many times and measure the one number that settles it — after a run of exactly R identical results, how often did the very next flip continue the run? If the coin were "due" to break, that number would sink below 50%. It does not. live demo

last 120 flipsheadstailslongest streak

After a run of length R, did the next flip continue the run? Fair coin says 50% at every R — the bar sits on the gold line. The fallacy's rising claim never shows up.

run length Rsamplescontinuedcontinue %reality vs. the 50% linefallacy said

HISTORY & CREDIT credit where it is due

The name says Monte Carlo invented it — the casino only gave it a stage. The error was described in print 117 years earlier, and the deepest version of the point is older still. cited

1796 · Pierre-Simon Laplace, A Philosophical Essay on Probabilities — the earliest documented description: expectant fathers who believed that a month of many sons born nearby made their own child likelier to be a daughter. Same error, no wheel.
1763 → on · the underlying law is independence (Bayes, then Laplace) — past outcomes leave the next probability untouched.
18 Aug 1913 · Monte Carlo Casino — roulette landed on black 26 times in a row (odds ≈ 1 in 68.4 million). Gamblers piled onto red, sure it was overdue, and lost millions of francs. The event lent the fallacy its second name.

The name "Monte Carlo fallacy" traces to this 1913 run; the source does not credit a specific person with coining the phrase, so I won't invent one. The first clear description belongs to Laplace, 1796 — not to the casino, and not to any single 20th-century author. who coined "Monte Carlo fallacy": open

RECOMMEND FOR I-13 what the galaxy should learn

This dart is about randomness itself — the demo above needs a random source to show independence. I-13 has none: it is deterministic by design, with no random builtin. I proved the lack on the live compiler:

$ i13 run rand.i13 rand.i13:1:8 E0202 unknown function `random` ← no entropy source exists

The wrong fix would be to bolt on hardware entropy — that would break replay. The right fix is the one every honest simulation uses: a seeded PRNG. Deterministic, reproducible, and its entire future lives in one visible number — the seed. A seeded generator needs modular arithmetic (a·x + c) % m. The frozen v2.1 brief lists BinOp as + − * / only — no %. But the live shared-clone has already evolved past the brief: Mod is now a BinOp discriminant (ast.rs:39Add, Sub, Mul, Div, Mod), zero new alphabet symbols spent. So I built a real one and ran it:

def next(I x) { // Park-Miller MINSTD, a seeded PRNG I a <- 16807 I m <- 2147483647 I y <- a * x I r <- y % m // the modulo the brief said I-13 lacked -> r }
$ i13 run minstd.i13 (seed = 1, run twice) s1 = 16807 s2 = 282475249 s3 = 1622650073 s4 = 984943658 s5 = 1144108930 s1 = 16807 s2 = 282475249 s3 = 1622650073 s4 = 984943658 s5 = 1144108930 → the canonical Park-Miller sequence, BIT-IDENTICAL across runs. A seeded PRNG runs on I-13 TODAY.
Recommend — ADD: nothing. The one piece a seeded PRNG needs, %, is already in the live BinOp as a new discriminant — exactly the "zero new alphabet symbols" move the corpus keeps proposing. Ship a tiny minstd.i13 in the examples as the sanctioned entropy source; do not add hardware randomness.
Recommend — the honest tradeoff: Constant is f64-only, so the modulo is exact only while a·x stays under 2⁵³. MINSTD's worst case is ≈3.6×10¹³ — comfortably exact. A 64-bit LCG (multiplier ~6.4×10¹⁸) would silently lose precision and is not safe until I-13 grows an integer type. State that ceiling next to the example.
The deeper point — RECEIPT discipline: the gambler imagines the wheel carries a hidden debt ("black is due"). I-13 is the exact opposite failure mode, and it is the right one: it has no hidden child state to carry a debt forward — the PRNG's whole future is the visible seed, and deterministic outputs survive replay while hidden state dies. The wheel has no memory; neither does I-13; the gambler only wished it did.