100 Prisoners — Hat Parity Strategy
Interactive simulator for the optimal strategy: guarantee 99 survivors; only the first caller is ever at risk.
Use the first guess as one bit of information
Worst case: 99 surviveSignal
RED = even parity
BLUE = odd parity
First caller
Counts red hats seen. Their own guess is the only risky one.
Everyone else
Uses the signal to deduce their own hat exactly.
Result
0 survivors
Executed: 0
Called: 0 / 100
Guaranteed: at least 99
Expected: 99.5
The 100 prisoners
The outline marks the current caller.
Red
Blue
Current caller
Call order
Whoever is called first becomes the parity broadcaster.
Reasoning for this call
Press Next caller to begin.
Why it works
1. Broadcast parity
The first caller announces whether the number of red hats among the other 99 is even or odd.
2. One missing bit
A later prisoner sees every hat in that 99-person set except their own.
3. Recover the missing bit
Comparing the visible parity with the announced parity reveals whether their own hat is red or blue.
Why 100 guaranteed survivors is impossible:
the first caller sees the same 99 hats whether their own hat is red or blue. Any fixed guess must be wrong in one of those two worlds.