The dart campaign’s own metaphor, from 1777: drop needles on a lined floor and count how many cross a line, and the number π falls out of pure chance. It is the first Monte Carlo method — throwing things at random to compute a number — invented 170 years before the name. We literally throw the darts below.
THE TECHNIQUE drop needles · count crossings · read π
Rule the floor with parallel lines a needle-length apart. Throw needles at random. A fraction 2/π of them cross a line — so π ≈ 2N / crossings. No circles, no calculus; π emerges from counting. live demo
P(cross) = 2L / (πD) // needle length L, line spacing D
π ≈ (2 · L · N) / (D · crossings) // here L = D, so π ≈ 2N / crossings
HISTORY & CREDIT the first Monte Carlo, 170 years early
People date “Monte Carlo” methods to the atomic bomb. The technique is far older — a naturalist did it with sewing needles in the Enlightenment. cited
1733 · Georges-Louis Leclerc, Comte de Buffon poses the needle problem to the Paris Academy — the birth of geometric probability. 1777 · Buffon publishes the solution in Essai d’arithmétique morale: the crossing probability is 2L/πD. 1812 · Pierre-Simon Laplace notes it the other way round — the experiment estimates π. 1940s · at Los Alamos Stanislaw Ulam revives the idea; Nicholas Metropolis gives it the name Monte Carlo — for the casino where Ulam’s uncle gambled — and von Neumann designs the first ENIAC run, coded by Metropolis and Klara von Neumann.
So the dart-throw that names this whole campaign has a pedigree: Buffon threw the first one, and got π back. foundational
RECOMMEND FOR I-13 the arithmetic runs; the throw is the wall
Given the crossing count, π is one division — and I-13 computes it, on main:
I throws <- 10000
I hits <- 6366
I pi <- (2 * throws) / hits
$ i13 run buffon.i13
RUN OK
hits = 6366
pi = 3.1416902293433866
But the throw itself — a random needle — I-13 cannot make. It has no source of randomness at all:
I-13 has no rand / random / entropy op — determinism is a DESIGN PROPERTY, not an oversight.
Recommend: a seeded PRNG as an ordinary I-13 function — exactly what dart 004 (xorshift) already asked for. That keeps determinism (same seed → same stream, reproducible) while unlocking the whole Monte Carlo family. Two darts now converge on it. Honest tension: I-13’s refusal of hidden state is a feature — a probabilistic method in a deterministic language must carry its seed in the open. That is the right shape for it: randomness as an explicit, seeded input, never an ambient side effect.