Sub topic 7
The gambler's fallacy and how players perceive chance
This chapter assumes you know basic probability from the earlier chapters: independent events, expected value, and variance. It also assumes you can read short Python programs. The aim is to understand how players misjudge random events and what a designer can do about it.
What the gambler's fallacy is
The gambler's fallacy is the belief that a random outcome is "due" because it has not happened recently. A player who sees four heads in a row feels that tails is now more likely. For independent events, it is not. The coin has no memory.
The fallacy does not come from carelessness. People expect a small sample to look like the long-run average, so a streak feels like a violation that must be corrected. Games make this worse because players often see only a few dozen outcomes, and each one has a cost or a reward attached.
You can check the claim directly. This program flips a fair coin 200,000 times and looks only at flips that follow five heads in a row.
import random
rng = random.Random(11)
flips = [rng.choice('HT') for _ in range(200000)]
streak = list('HHHHH')
after = [flips[i] for i in range(5, len(flips)) if flips[i - 5:i] == streak]
print(len(after), after.count('H') / len(after))The fraction of heads after a five-head streak comes out close to 0.5. The past flips did not change the next one.
Why real randomness looks wrong
True random sequences contain more streaks than people expect. In 100 fair flips, a run of five or more identical results appears roughly 81% of the time. Players who invent a "random" sequence by hand usually alternate too often, so a real random sequence looks suspicious to them.
The same effect applies to loot. Suppose an item drops with probability 5% per attempt. The chance of 20 failures in a row is 0.95^20, about 36%. After those 20 failures, the next attempt is still 5%. The chance of 59 failures in a row is about 4.9%, so roughly one player in twenty will see it. In a game with a million players, thousands of them will have an experience that feels broken and is entirely normal.
A family of related biases
The gambler's fallacy is one of several misperceptions. Designers meet all of them, and they push in different directions.
| Bias | What the player believes | Typical game situation |
|---|---|---|
| Gambler's fallacy | A streak must end soon | "I missed three times, the next shot will hit" |
| Hot hand | A streak will continue | "I am on a roll, keep betting" |
| Clustering illusion | Random clumps have a cause | "The server hates me today" |
| Probability misjudgment | 90% means near certain, 5% means almost never | A 90% hit chance that misses feels like a bug |
Which of these a player applies often depends on whether the source feels like a mechanism or a person. People tend to apply the gambler's fallacy to coins and dice, and the hot hand to skilled humans. A player shooting free throws in a basketball game may expect the hot hand. The same player at a roulette-style minigame expects the wheel to correct itself.
How the perception loop works
Players do not experience probabilities. They experience events, and they remember the unpleasant ones more. A miss at 90% is far more memorable than the nine hits around it. Loss also weighs more than gain, so a bad streak registers more strongly than an equal good one.
Design response 1: leave it alone and be honest
If the randomness is meant to produce tension, a streak may be part of the experience. The cost is that some players will feel cheated. Honest communication helps. Show real drop rates, and show the player's own history where it is meaningful, such as "attempts since last rare drop." This turns an invisible process into a visible one and discourages the belief in hidden rigging.
Be careful with the display of odds. Showing a "90% to hit" label invites players to treat it as a guarantee. Some designers round displayed values or use words instead of numbers. Others accept the complaints and keep the numbers exact because trust matters more.
Design response 2: make the game match the belief
Many games quietly turn the gambler's fallacy into a true statement. The system tracks recent outcomes and adjusts later ones so that "due" really means due. You have already seen two tools for this, and this chapter adds a third.
- A shuffle bag guarantees the long-run mix and limits streak length.
- A pity timer forces a success after a fixed number of failures.
- A streak breaker raises the success chance after each miss and resets it after a hit.
Here is a streak breaker and a test of its effect.
import random
def roll_hit(rng, state, shown=0.5, bonus=0.1):
chance = min(1.0, shown + bonus * state['misses'])
hit = rng.random() < chance
state['misses'] = 0 if hit else state['misses'] + 1
return hit
def longest_miss_run(bonus, n=10000, seed=5):
rng = random.Random(seed)
state = {'misses': 0}
best = run = 0
for _ in range(n):
if roll_hit(rng, state, 0.5, bonus):
run = 0
else:
run += 1
best = max(best, run)
return best
print(longest_miss_run(0.0), longest_miss_run(0.1))With a bonus of 0.0, the generator is plain and the longest miss run over 10,000 tries is large, typically a dozen or more. With a bonus of 0.1, the chance reaches 100% after five misses, so no run can exceed five.
Costs of correcting for the fallacy
Making outcomes correct themselves has side effects that you should weigh before using it.
- The real rate changes. In the example above, the actual hit rate is higher than the shown 50%. If you display 50%, you are misleading players. Either compute the real rate by simulation and show that, or keep the shown value as the base and say that bad luck protection exists.
- Predictability becomes exploitable. If players learn that a hit is guaranteed after five misses, they can plan around it. In a competitive game this can reward gaming the system over playing well.
- It can hurt the opposite streak. Systems that help after losses can feel unfair to the player who just got a lucky run, if the system also trims luck on the way up. Most designers adjust only the downside.
- Hidden fudging can break trust. Some strategy games quietly improve displayed low odds. This reduces complaints, but if players discover it, the discovery can damage trust more than the original streaks did.
Designing with perception in mind
A practical checklist for a random mechanic:
- Identify how often a player will see the outcome. Rare events with few samples are the most likely to feel wrong.
- Find the worst plausible streak. Compute it, for example 0.95^n for failures, or simulate it.
- Decide whether that streak is acceptable fun or a quit point.
- If it is a quit point, choose a limiter: a shuffle bag for fixed ratios, a pity timer for rare rewards, or a streak breaker for combat odds.
- Test the limiter by simulation and confirm the real long-run rate.
- Decide what to tell the player, and make sure it is true.
Exercise
A loot box gives a rare item with probability 4% per open, with no pity system. A player has opened 30 boxes and received nothing. (a) What is the chance that the 31st box gives the rare item? (b) What is the chance of going 30 opens without a rare item, to the nearest percent? (c) Name one tool that would cap the dry streak, and say what it costs in design terms.
Show answer
(a) 4%. Each open is independent, so the earlier 30 failures do not change it. (b) 0.96^30 is about 0.294, so roughly 29%. This is why many players will see such a dry streak. (c) A pity timer, for example a guaranteed rare on the 50th open, caps the dry streak at 49 failures. The cost is that the real long-run rare rate rises above 4%, and the rule becomes predictable, so the designer must recompute the economy and tell players the rule honestly.