Darkmont logoDarkmont ← Journal
Science

When Physics Started Rolling Dice

Some problems in physics can be written as a neat equation and solved. Most cannot. By the 1940s, the physicists at Los Alamos had run hard into that wall: they needed to know how neutrons travel through material — scattering, bouncing, occasionally splitting an atom — and no formula they could write would give the answer. The solution they reached for was strange. They decided to let the computer gamble.

The idea came to the mathematician Stanislaw Ulam, the story goes, while he was recovering from an illness and playing solitaire. He wondered what the odds were of winning a given layout, found the exact calculation hopeless — and realized he could simply deal the cards many times and count. The probability was unknowable by formula but easy to estimate by sampling.

He and John von Neumann saw that a neutron’s path was the same kind of problem. You couldn’t solve for it, but you could simulate a single neutron — letting a stream of random numbers decide, at each step, whether it scattered, where it went, whether it split — and then do that thousands of times and watch the pattern that emerged. Run enough random histories and their average reveals what the equation would not.

Nicholas Metropolis gave it a name, after the casino at Monte Carlo where Ulam’s uncle once borrowed money to gamble. They ran the first versions on ENIAC, one of the earliest electronic computers. It was, in a real sense, the moment physics began using the computer not as a fast calculator but as a laboratory — a place to run experiments on mathematics itself.

The method outgrew its origins almost immediately. Monte Carlo simulation is now everywhere a problem is too tangled to solve directly: in finance, in weather forecasting, in the way films render light, in the training of modern AI. Whenever a system has too many moving parts to follow by hand, the same trick applies — don’t solve it, sample it.

What’s striking is how humble the core idea is. Faced with a problem too hard for cleverness, they didn’t find a cleverer formula. They accepted that they couldn’t, and let scale and randomness do the work instead. Sometimes the most powerful move in software is to stop trying to compute the exact answer and start trying to approximate it honestly.

We like that instinct — reaching for the simple, honest method over the impressive one. It tends to age better. More about how we work →