Sub topic 10
Risk and reward as a design tool
This chapter assumes you know expected value and variance from earlier chapters. It also assumes you can read short Python programs. Here you will use those ideas to design choices where the player decides how much chance to accept.
What risk and reward mean in a design
A risk is a chance of losing something the player values. A reward is what the player gains if the risk pays off. A risk-reward choice offers two or more options that differ in how much chance they carry.
The key design fact is that two options can have the same expected value and still feel completely different. Variance is the difference. A safe option has low variance and a gamble has high variance. When a designer offers both, the player picks a personality as well as a number: careful or bold.
Risk-reward is therefore a design tool for creating decisions. Random outcomes by themselves are only noise. A decision about how much noise to accept gives the player agency over that noise.
Same average, different spread
The following program compares a guaranteed 10 gold with a coin flip for 20 gold or nothing. It computes the expected value and the standard deviation, which is a common measure of spread.
from math import sqrt
def mean(option):
return sum(p * v for p, v in option)
def spread(option):
m = mean(option)
return sqrt(sum(p * (v - m) ** 2 for p, v in option))
safe = [(1.0, 10)]
gamble = [(0.5, 0), (0.5, 20)]
for name, option in (("safe", safe), ("gamble", gamble)):
print(name, mean(option), spread(option))Both options have an expected value of 10. The safe option has a spread of 0, and the gamble has a spread of 10. If a player's decision ignores the spread, the two options are interchangeable. In practice players do not ignore it, which is where the design value comes from.
Why players do not treat equal averages as equal
Players rarely behave like expected-value calculators. Three habits matter most to designers.
- Loss aversion. A loss usually feels stronger than a gain of the same size. Research on this effect, often quoted as roughly two to one, varies by context. Treat it as a tendency and not a constant.
- Context. A player who is behind often wants variance, because a safe line loses slowly. A player who is ahead usually wants to reduce variance.
- Ruin. A gamble that can remove the player from the game is judged far more harshly than one that costs a little progress, even when the odds are identical.
The second habit is the most useful for design. The right amount of risk depends on the player's position, so the same gamble can be smart for one player and foolish for another. That dependence creates strategy.
A worked example: push your luck
Push-your-luck games ask the player to keep taking a risky action for a growing reward. Suppose that on each roll of a six-sided die, a 1 busts the player and loses the whole pot. Any other result adds 5 points. The player may stop at any time and keep the pot.
If the current pot is S, rolling again has an expected change of:
(5/6) × (S + 5) + (1/6) × 0 − S = (25 − S) / 6
This is positive while S is below 25 and negative above it. So the expected-value-maximizing player rolls until the pot reaches 25, which takes five successful rolls. The program below computes the expected score for each stopping point.
def expected_score(rolls, step=5, bust=1 / 6):
return (1 - bust) ** rolls * step * rolls
for n in range(1, 9):
print(n, round(expected_score(n), 2))| Rolls before stopping | Pot | Expected score |
|---|---|---|
| 3 | 15 | 8.68 |
| 4 | 20 | 9.65 |
| 5 | 25 | 10.05 |
| 6 | 30 | 10.05 |
| 7 | 35 | 9.77 |
| 8 | 40 | 9.30 |
Stopping after five or six rolls scores best. Look at what that strategy costs. The chance of reaching five successful rolls is (5/6)^5, about 40%. The "optimal" player therefore goes home with nothing about 60% of the time. A strategy that maximizes the average can feel terrible turn by turn, which is the variance-and-streaks lesson applied to a decision.
The design levers
You control a risk-reward choice with four settings. Change one at a time when you tune.
- Probability of the bad outcome. In the push-your-luck game, this is the bust chance.
- Size of the loss. Losing the pot is harsh. Losing only the last step is mild.
- Size of the reward. A larger payoff pushes the break-even point higher.
- Cost of retreat. If stopping is free, players stop early. If stopping has a price, risk becomes more attractive.
Making the choice real
A risk-reward choice only works when it satisfies several conditions.
- The player can estimate the odds. Hidden or misleading odds turn a decision into a guess. Show probabilities, or make them learnable through play.
- Neither option dominates. If the gamble has a higher expected value and equal or lower risk, nobody picks the safe option. Check that each option wins in some situation.
- The choice is the player's. This is input randomness in the chapter on input and output randomness. The player picks the risk before the dice roll, so the result feels earned.
- Losses are recoverable. Permanent loss makes players avoid risk altogether, and the choice stops being interesting.
- Stakes vary. A game where every gamble has the same size teaches one answer. Mixing small and large gambles makes the player read the situation.
Common failure modes
Always the same answer. If one option is better in nearly every situation, the choice is fake. Simulate both options across typical game states and confirm that the best option changes.
Punishing boldness. If a gamble's expected value is lower than the safe option and nothing else rewards it, bold players lose consistently. They will blame the game, not their choice.
Rich-get-richer risk. If winning players can also take the safest options, the lead grows without effort. Give trailing players access to high-variance options, as covered in the later chapter on catch-up and recovery.
Ruin cascades. A single bad outcome that removes several future options feels unfair even at 5% odds. Cap the damage or give a recovery path.
Summary
Risk-reward choices turn variance into a decision. Keep the average value of the options close, make the spreads clearly different, and let the player's position decide which option is right. Tune the probability, the loss, the reward, and the cost of retreat, then check the results by simulation.
Exercise
A player may take a guaranteed 10 points or a gamble with a 30% chance of 40 points and a 70% chance of 0. Compute the expected value of each option. Then give one situation in which a player should still choose the option with the lower expected value.
Show answer
The safe option has an expected value of 10. The gamble has an expected value of 0.3 × 40 = 12, so it is higher on average. A trailing player who needs at least 40 points to win should still take the gamble, which is the case here. A leading player who only needs 10 points to clinch victory should take the guaranteed 10 even though its expected value is lower, because it removes the 70% chance of getting nothing. In both cases the position changes which option is better, not the average.
Exercise
In the push-your-luck game, change the bust chance from 1/6 to 1/4 (a roll of 1 or 2 on a four-sided die) with the same 5-point step. Using the expected-change formula, at what pot size does rolling stop being worthwhile?
Show answer
With bust chance 1/4, rolling again changes the expected pot by (3/4) × (S + 5) − S = (15 − S) / 4. This is zero at S = 15, so rolling is worthwhile while the pot is below 15, meaning the player should stop after three successful rolls. A higher bust chance moves the stopping point down.