Sub topic 14
Mitigating Bad Luck with Catch-Up and Recovery
This chapter assumes you understand basic probability, expected value, variance, weighted tables, and seeded random number generators. The goal is to control unlucky outcomes without removing meaningful uncertainty.
Why bad luck needs mitigation
A fair random system can still produce a painful short-term result. A player with a 10% chance of finding an item can miss ten times in a row. That outcome is possible, even though the long-run average is close to one success every ten attempts.
Players usually judge fairness from their recent experience, not from a large sample. If an unlucky streak blocks progress, the player may stop seeing the system as challenging and start seeing it as broken. Bad-luck mitigation adds a recovery path while preserving chance.
Common tools include:
- A guaranteed reward after a maximum number of failures.
- Increasing odds after each failure.
- A recovery resource that lets the player reroll or reduce risk.
- Catch-up rewards for players who fall behind.
- More generous future encounters after a severe loss.
These tools solve different problems. A pity timer protects a player from a long failure streak. Catch-up helps restore competition between players with different recent results. Recovery gives the player a decision instead of only waiting for luck to improve.
Catch-up and recovery models
| Model | How it works | Main risk |
|---|---|---|
| Pity timer | Guarantees success at a limit | Players optimize around the limit |
| Increasing odds | Raises the chance after each failure | The true probability becomes harder to explain |
| Recovery choice | Offers a reroll, shield, or alternate reward | Players may save it forever |
| Catch-up reward | Gives more value to players who are behind | Leaders may feel punished |
A good system defines exactly what counts as failure and when the protection resets. For example, a pity counter might increase after an unsuccessful rare-item roll and reset when the item appears. It should usually be stored with the player’s progress so a restart cannot accidentally erase protection.
A simple increasing-chance system
The following function starts with a 10% chance and adds 10 percentage points after each failure. It guarantees success on the tenth attempt. The random generator is passed in so tests and replays can use a known seed.
import random
def attempt_reward(rng, state, base_chance=0.10, increase=0.10, limit=10):
state["failures"] += 1
chance = min(base_chance + increase * (state["failures"] - 1), 1.0)
if state["failures"] >= limit or rng.random() < chance:
state["failures"] = 0
return True
return False
rng = random.Random(4)
state = {"failures": 0}
results = [attempt_reward(rng, state) for _ in range(12)]
print(results)This system changes the distribution of waiting times. Its average reward rate is no longer the same as a fixed 10% roll, so balance it using simulation rather than intuition. Track both the average number of attempts and the worst observed streak.
Common design errors
Do not confuse fairness with identical outcomes. A trailing player may need additional resources, but secretly reducing another player’s odds can feel dishonest. Explain visible protection where possible.
Do not make protection so strong that players ignore choices. If every loss automatically grants a better future, risk loses its meaning. Also test edge cases: disconnected players, saved games, skipped turns, simultaneous rewards, and a counter that reaches its maximum.
Exercise
A reward has a 20% chance on each attempt, and the player has already failed four times. Name one mitigation that guarantees the player cannot fail forever, and state what must reset when the reward arrives.
Show answer
Add a pity limit or increasing chance. Reset the failure counter when the reward arrives.