The Lab
Ported to TypeScript

Gambler's Demise

The double-your-bet-on-every-loss system feels unbeatable for a while, and then the house edge collects with certainty — here is that certainty, simulated.

ProbabilityMonte CarloTypeScriptRecharts
Original Python experiment by GM
Loading demo…

The Martingale is the most seductive bad idea in gambling: bet even money, double after every loss, and the first win recovers everything plus one unit. On paper you can never lose. In practice you are betting against a wall — a finite bankroll and a table limit — and the house edge is patient.

This experiment runs the system thousands of times against an American roulette wheel and shows the shape of the inevitable. A single dramatized round climbs pleasantly, then falls off a cliff. Across many rounds the average outcome is ruin; the only variable is how long it took to arrive.

On the rebuild

Ported from a Python 2 script (print-statement era). The wheel model is corrected to a standard 38-pocket American layout so the house edge is accurate.

Next in the Lab
A Neuron LearnsOpen

Eleven lines of Python teaching themselves a rule — watch the error flow backwards.