01

The Numbers

~31%
Smart Strategy Win Rate
Precisely 1 - ln(2) = 0.3069. The cycle-following strategy achieves this across all runs.
~0%
Random Strategy Win Rate
At 100 prisoners, random box selection gives approximately (1/2)^100 probability of success. Effectively zero.
2003
Year of Publication
Introduced by Anna Gal and Peter Bro Miltersen. One of the most counterintuitive results in combinatorial probability.
02

The Problem

One hundred prisoners are each assigned a unique number from 1 to 100. In a room, 100 boxes are arranged — each containing a random slip with one of those numbers. The prisoners must enter the room one at a time, open up to 50 boxes, and find the slip bearing their own number.

They cannot communicate once the trials begin. They cannot leave marks. Each prisoner enters, opens boxes, and leaves — with no way to signal what they found.

If every single prisoner finds their number, they all go free. If even one fails, everyone is executed.

A random strategy — each prisoner opens 50 boxes at random — gives each individual a 50% chance. But the probability that all 100 succeed independently is (1/2)^100. This is not a rounding error. It is effectively zero.

The cycle-following strategy changes the collective probability to approximately 31%. This should not be possible. No communication occurs. Each prisoner acts alone. Yet the strategy coordinates them through the structure of the room itself.

The strategy: each prisoner starts at the box numbered with their own prisoner number. They open it, read the slip inside, and open the box with that number next. They follow this chain — each slip pointing to the next box — until they either find their own number or exhaust their 50 opens.

This works because the 100 slips form a mathematical structure called a permutation. Any permutation can be decomposed into cycles — closed loops where following the chain always returns to the starting point.

If every cycle in the permutation has length 50 or less, every prisoner following the strategy will find their number within their allowed opens. The question becomes: what is the probability that a random permutation of 100 elements contains no cycle longer than 50?

The answer is approximately 31%. Not because of any trick. Because of the mathematical structure of permutations — a structure the prisoners exploit without ever discussing it.

03

The Strategies

Smart Strategy
Win Rate: ~31% — Cycle Following
Start at your own box number. Follow the slip to the next box. Repeat. This traces the permutation cycle containing your number. If no cycle exceeds N/2 in length, every prisoner succeeds. The room's structure does the coordination.
Random Strategy
Win Rate: ~0% — Independent Selection
Open 50 boxes at random. Each prisoner has 50% individual odds but each trial is independent. The probability all 100 succeed simultaneously is (1/2)^100. No mathematical structure is exploited. No implicit coordination occurs.
Manual Play
Win Rate: Depends on you
Play as each prisoner yourself. Open boxes one at a time. Discover the cycle structure firsthand. The end screen reveals the full permutation — every cycle, its length, whether it was lethal. The math becomes visible after the fact.
04

Simulation

Three difficulty modes. Play manually as each prisoner, watch the smart cycle strategy execute, or watch random selection fail. The end screen reveals the full permutation cycle structure — which cycles were safe, which were lethal, and why.

100 Prisoners — Probability Simulation
Based on Gal and Miltersen, 2003
05

Connection to Friction Bloom

Constrained Systems — Emergent Structure

The 100 Prisoners Problem and Friction Bloom study the same phenomenon from opposite directions. Friction Bloom introduces disruption to a navigating agent and measures whether it finds a novel path — a Bloom. The prisoners face a fixed constraint and must discover whether the room's hidden structure allows escape.

In both cases, the system finds a solution that was never designed for it. The cycle-following strategy was not written into the room. It emerges from the mathematical structure of permutations. The Bloom path was not designed into the grid. It emerges when the agent is forced off its baseline route by friction.

The deeper connection is cognitive. The prisoners cannot communicate, yet the smart strategy coordinates them — through the structure of the environment rather than through direct exchange. This is the same principle that governs emergent behavior in multi-agent systems, distributed cognition, and the MentiSystema Mesh. Structure, not signal, does the work.

06

Research Notes

Writing In Progress
Extended analysis coming — the psychology of collective cognition under constraint, why the cycle strategy feels like it should not work, and what this tells us about emergent coordination in systems that cannot communicate.