In 1946 the Polish mathematician Stanisław Ulam, von Neumann’s colleague at Los Alamos, was recovering from encephalitis and passing the time playing solitaire. He wondered what the probability was that a game would come out. Working it out by combinatorics was hopelessly complicated. But there was another way: play hundreds of games and count how many came out. With a computer, one could play thousands. Ulam told von Neumann the idea, and he saw its reach at once: the same trick served for the problem occupying them at Los Alamos, the path of neutrons in a bomb or a reactor, where each neutron is deflected, absorbed or multiplied at random. Instead of solving the equations, simulate thousands of neutrons, drawing lots for what happens to each one, and take averages. Nicholas Metropolis named the method after the Monte Carlo casino, where an uncle of Ulam’s used to gamble.