Sub topic 8
Risk and reward: comparing safe and gambling options
This chapter assumes you know the earlier ideas in this tutorial: opportunity cost, trade-off axes, and how uncertainty hides or reveals information. You should also be able to read short Python functions. The code is optional but helps with the math.
Why risk creates choices
Risk and reward is a trade-off on an axis that many designers forget to build. Two options can pay out the same on average, but one pays the same amount every time and the other swings widely. That swing is variance. It is what lets a player pick a style, not just a number.
A safe option has a known outcome. A gambling option (a risky option) has several possible outcomes, each with a probability. A choice between them is meaningful only if neither one is always better. The player must have a reason to take the gamble in some situations and decline it in others.
Risk differs from the uncertainty in the previous chapter in one respect. With uncertainty, the player may not know the odds. With risk, the odds are usually known or learnable, and the choice is about whether to accept them.
Expected value as a first measurement
The expected value (EV) of an option is the average payoff you would get if the choice were repeated many times. For each outcome, multiply the probability by the payoff, then add the results.
def expected_value(outcomes):
"""outcomes is a list of (probability, payoff) pairs."""
return sum(p * v for p, v in outcomes)
safe = [(1.0, 10)]
risky = [(0.5, 25), (0.5, 0)]
print(expected_value(safe)) # 10.0
print(expected_value(risky)) # 12.5The gamble has the higher EV (12.5 against 10.0). A player who only maximizes the average should always gamble. If that were the whole story, the safe option would be a dominated option, as covered in the previous chapter on dominance, and the choice would be no choice.
EV alone does not settle it, because players do not play the average. They play one situation at a time. The player's current position decides whether variance helps or hurts.
Situation changes the value of variance
Consider the same two options in different circumstances.
- A player with 9 health points faces a boss that needs 10 damage to defeat before the player's last turn. The safe option, which gives 10, wins for certain. The gamble gives 25 half the time and 0 otherwise. Here the safe option is better, because 10 is enough.
- A player faces a boss that needs 20 damage to defeat before their last turn. The safe option can never win. The gamble wins half the time. Here the gamble is the only way to win, though its EV is not what matters.
- A player is far ahead in a match. Variance can only hurt a leader, so they prefer safe options.
- A player is far behind. Variance is their friend, so they prefer gambles.
The lesson is that the value of a payoff is not linear. Ten extra points are worth a great deal when they push you past a threshold and very little when you are already far past one. Designers get meaningful risk choices by building thresholds, win conditions and catch-up situations into the game, so that the right pick depends on where the player stands.
def win_probability(outcomes, needed):
"""Chance that a single draw reaches the needed payoff."""
return sum(p for p, v in outcomes if v >= needed)
safe = [(1.0, 10)]
risky = [(0.5, 25), (0.5, 0)]
for needed in (10, 20):
print(
needed,
win_probability(safe, needed),
win_probability(risky, needed),
)
# 10 1.0 0.5
# 20 0.0 0.5Run this and you see that the better option flips with the target. When 10 is needed the safe option wins 100% of the time against 50% for the gamble. When 20 is needed, the safe option never wins while the gamble wins half the time. The EV numbers did not change. Only the goal did.
Designing the two sides
A risk choice needs both sides to be attractive. Several levers adjust them.
Payoff size
The upside of the gamble should be large enough to feel exciting, and the downside should be real. If the failed gamble costs nothing, it is not a gamble, because the player can try it with no cost. That removes the opportunity cost. A failed gamble should at least waste the turn or the resource spent on it.
Probability
Players estimate probabilities poorly. People overrate small chances and underrate large ones, and a displayed "90% to hit" often feels worse than it is when a miss happens. Designers often respond in one of two ways.
- Show exact numbers and accept that some players will feel cheated by bad luck.
- Hide the numbers behind labels or use hidden adjustments, which can feel fairer but reduces the player's ability to reason.
Either approach should be a deliberate choice. If you display odds, they should be true. A game that displays 90% but secretly adjusts the result will be found out and will lose the player's trust.
Variance shape
Two gambles with the same EV can still differ. A 50% chance at 25 and a 10% chance at 125 both give high averages, but the second is rarer and more dramatic. Use the shape to give each option an identity: the steady option, the swingy option, the long-shot option.
Recovery from failure
A gamble that can end the run on failure punishes harshly. One that costs a little time or a small loss invites experimentation. The lower the cost of failure, the more often players gamble. Roguelikes and card games set this intentionally. A game with frequent small gambles needs failure that is cheap. A game with rare high-stakes gambles can afford failure that hurts.
A comparison table of risk profiles
| Profile | Outcome pattern | Who tends to pick it | Design role |
|---|---|---|---|
| Guaranteed | One fixed payoff | Leaders, cautious players | Baseline, sets the floor |
| Coin-flip gamble | Two outcomes, near equal odds | Players near a threshold | Standard high-variance option |
| Long shot | Rare, large payoff | Players who are far behind | Comeback and fantasy of big wins |
| Safe with small upside | Small chance of bonus | Players who want a bit of excitement | Softens the gap between safe and risky |
Common errors
The gamble is simply better. If the EV of the gamble is far above the safe option, and failing costs little, players will always gamble. The safe option is a trap choice. Raise the cost of failure, lower the gamble's EV slightly, or make the safe option better in specific situations.
The safe option is simply better. If the gamble's EV is far below, nobody takes it except by mistake. Players who do take it learn that they were fooled. Fix the numbers or add a situation where the gamble is the only way to win.
EV matched but no situations. Even a perfectly balanced pair is a non-choice if every situation looks the same. The player picks a favorite and sticks with it. Add thresholds, score gaps or opponent states that change the best pick.
Streaks feel unfair. In a long sequence, a 10% failure will happen three times in a row for some players. Players read this as a bug. Some games reduce this with "pity" systems that raise the chance after repeated failures. Use them knowingly, because they change the true odds.
Hidden variance in "safe" options. If a nominally safe action can fail from a source the player cannot see, such as a hidden dice roll, the player cannot make a reasoned choice. Telegraph every roll that matters. The next chapters on telegraphing and feedback cover this in more depth.
Checking a risk choice in practice
A quick data check is to simulate a situation many times and count how often each option wins. This tells you whether the pick depends on the situation.
import random
def play(outcomes, rng):
roll = rng.random()
total = 0.0
for p, v in outcomes:
total += p
if roll < total:
return v
return outcomes[-1][1]
def win_rate(outcomes, needed, trials=100_000, seed=1):
rng = random.Random(seed)
wins = sum(play(outcomes, rng) >= needed for _ in range(trials))
return wins / trials
safe = [(1.0, 10)]
risky = [(0.5, 25), (0.5, 0)]
for needed in (10, 20):
print(needed, win_rate(safe, needed), round(win_rate(risky, needed), 2))If the better option is the same at every target, you have found a dominance problem. If it changes, the choice is alive. In a real game, you would replace the single target with the range of states that players actually reach, then see how often each state occurs.
Summary of design rules
- Make sure both options are best in some situation.
- Give the gamble a real downside so it has an opportunity cost.
- Tie the best pick to thresholds, standings or resources the player can see.
- Show true odds, and explain how streaks or adjustments work.
- Match the cost of failure to how often gambles happen.
Exercise
A safe option gives 8 points for sure. A gamble gives 20 points with probability 0.4 and 0 otherwise. (a) Which has the higher EV? (b) A player needs at least 15 points to win this turn. Which option should they pick, and why? (c) The player instead needs only 8 points. Which option?
Show answer
(a) The safe option has EV 8. The gamble has EV 0.4 × 20 = 8. They are equal. (b) The gamble. The safe option can never reach 15, while the gamble reaches it 40% of the time. (c) The safe option. It wins 100% of the time, while the gamble wins only 40% of the time. The EV is equal in all three cases, but the best pick changes with the target.
Exercise
Your playtest shows 95% of players always choose the gamble in a card game, even when ahead. Name two causes and one fix for each.
Show answer
Cause 1: the gamble has a higher EV and failing costs almost nothing. Fix: add a real cost to failure, such as losing the card played. Cause 2: nothing in the game makes variance harmful to a leading player. Fix: add a threshold or lead-based rule, such as a bonus for finishing a round with a stable lead, so that safe play is best when ahead.