Sub topic 12
Balancing risk against reward
This chapter assumes you can compute expected value and variance for a simple gamble. It also assumes you know the difference between input and output randomness, and you can read short Python. Earlier chapters covered those pieces. Here you combine them into a method for deciding whether a risky choice is tuned well.
What "balanced" means
A risk-reward choice is balanced when several options remain worth picking, depending on the player's situation and temperament. Balance does not mean equal expected value. If every option averages the same, the choice is flat and players pick by taste. That is sometimes fine. More often you want the risky option to pay a premium for its volatility, and the premium should be small enough that cautious play stays viable.
A choice can fail in three ways:
- One option beats the others on every measure, so the choice is not a real decision.
- The risky option's premium is so large that nobody plays safe, or so small that nobody gambles.
- The cost of failure is so punishing that a rational player avoids the risk altogether, however good the average payoff.
The levers you can turn
Every risk-reward choice is built from a few adjustable parts. Know which one you are changing, because each shifts a different feeling.
| Lever | What it changes | Typical side effect |
|---|---|---|
| Payoff size | Expected value and variance together | Large payoffs create memorable wins but widen the spread |
| Probability | Expected value and how often failure happens | Low odds make the reward feel rare and the failure feel unfair |
| Cost of failure | Stakes on the downside | Harsh costs make players risk-averse, whatever the average |
| Recovery path | How long a failure hurts | Easy recovery encourages bolder play |
| Information | How well players can judge the odds | Hidden odds shift play toward guessing and superstition |
| Mitigation | Whether players can reduce risk for a price | Cheap mitigation can remove the risk entirely |
Change one lever at a time when you can. If you change payoff and probability together, you will not know which one produced the new behavior.
Check for dominance first
Before tuning feel, check whether any option is strictly worse than another. Using expected value and standard deviation, option A dominates option B if A's average is at least as high and its spread is at least as low, with one of the two strictly better. A dominated option is never worth choosing, so it is dead content.
The standard deviation is the square root of the variance. It is in the same units as the payoff, which makes it easier to read.
from math import sqrt
def expected_value(outcomes):
return sum(p * v for p, v in outcomes)
def std_dev(outcomes):
mean = expected_value(outcomes)
return sqrt(sum(p * (v - mean) ** 2 for p, v in outcomes))
options = {
"safe": [(1.0, 10)],
"risky": [(0.5, 25), (0.5, -2)],
"reckless": [(0.1, 100), (0.9, -8)],
}
stats = {name: (expected_value(o), std_dev(o)) for name, o in options.items()}
for name, (ev, sd) in stats.items():
print(f"{name}: ev={ev:.2f} sd={sd:.2f}")
def dominates(a, b):
ev_a, sd_a = stats[a]
ev_b, sd_b = stats[b]
at_least_as_good = ev_a >= ev_b and sd_a <= sd_b
strictly_better = ev_a > ev_b or sd_a < sd_b
return at_least_as_good and strictly_better
for a in options:
for b in options:
if a != b and dominates(a, b):
print(f"{b} is dominated by {a}")The output is:
safe: ev=10.00 sd=0.00
risky: ev=11.50 sd=13.50
reckless: ev=2.80 sd=32.40
reckless is dominated by safe
reckless is dominated by riskyThe safe and risky options are both alive. Risky offers 1.5 more on average in exchange for a spread of 13.5. The reckless option is dead: it averages less than the safe option and swings far more. To fix it, raise its payoff or its probability until it offers something the others do not.
Standard deviation is a crude test. A player who needs a big score to avoid elimination may still want the reckless option, because they care about the chance of reaching a target and not about the average. Dominance by averages tells you the option is weak for a neutral player. It does not prove the option is useless in every game state.
Match volatility to the audience
The right amount of variance depends on how many times the choice repeats and who is playing.
- Frequent, low-stakes choices can be volatile. Over many repetitions, results drift toward the average, so skill shows through.
- Rare, high-stakes choices punish variance. One bad roll can decide the game, and players feel the outcome was luck.
- Competitive players tend to prefer low variance, since it rewards skill.
- Casual and party players often prefer high variance, since a lucky win is a good story and a loss is not a verdict on their ability.
A useful habit is to ask how many times a player makes this choice in one session. If the answer is once, treat variance as the main design problem. If it is fifty times, treat the average as the main one.
Tune a push-your-luck knob by simulation
Push-your-luck games have a built-in tuning knob: the chance of busting. Raising it moves the best stopping point earlier. You can reason about this with a one-step check. With pot P, rolling once changes the average by the chance of each good roll times its value, minus the chance of a bust times P. In the spine's dice game, one face busts. The five safe faces add 2 through 6, which totals 20. So rolling is worth it while 20/6 is greater than P/6, which means below a pot of 20.
The simulation below generalizes the game so that the first bust_faces faces of the die lose the pot. It searches for the best banking threshold for each setting.
import random
def play_turn(threshold, bust_faces, rng):
pot = 0
while pot < threshold:
roll = rng.randint(1, 6)
if roll <= bust_faces:
return 0
pot += roll
return pot
def best_threshold(bust_faces, thresholds, turns=20_000, seed=7):
results = {}
for t in thresholds:
rng = random.Random(seed)
results[t] = sum(play_turn(t, bust_faces, rng) for _ in range(turns)) / turns
best = max(results, key=results.get)
return best, results[best]
for bust_faces in (1, 2, 3):
best, score = best_threshold(bust_faces, range(3, 41))
print(bust_faces, best, round(score, 2))The same one-step reasoning gives break-even pots of about 20, 9 and 5 for one, two and three bust faces. Expect the simulated best thresholds to land near those values. Because the curve is flat near its peak, noise can move the winner by a point or two. The seed is fixed so each threshold sees the same random stream, but the winner can still shift if you change turns or the seed.
The design lesson is that one parameter controls how long players press on. If playtesters bank too early, lower the bust chance or raise the reward for large pots. If they bust constantly, do the opposite.
The balancing loop
Balancing is a loop, not a single calculation. Math finds obvious defects, simulation finds subtle ones, and humans find the ones that only appear with real psychology.
Balance the failure side too
A risk is only as scary as its downside. Two options with identical odds feel different if one costs a turn and the other costs a character. When tuning, adjust failure and recovery together:
- If failure is severe, give the player a visible way back, such as catch-up resources or a safe fallback. Otherwise, players stop taking the risk.
- If failure is mild and recovery is quick, the risk becomes background noise. Raise the payoff for success only if you want the risk to matter again.
- If mitigation exists, price it. A hedge that costs less than the risk it removes will be taken every time, so the risk disappears.
Common errors
- Balancing on averages alone. Two options with the same expected value can play very differently. Always read variance too.
- Ignoring player perception. Loss aversion makes a 50% chance to lose 10 feel worse than a 50% chance to win 10 feels good. Players may demand a larger premium than the math says. Test it before you trust the numbers.
- Tuning several levers at once. You lose the ability to tell what worked.
- Trusting a single simulation. Run it with several seeds. If the ranking of options flips between seeds, the difference is noise.
- Simulating only one strategy. A simulation shows how a fixed rule performs. Players adapt, so test several rules, including ones that react to the game state.
- Fixing a dominant option by nerfing it into uselessness. Sometimes the better repair is to lift the weaker options instead.
Summary of the method
Describe the choice in outcomes and probabilities. Compute expected value and variance. Remove dominated options. Simulate the repeated game with several strategies and seeds. Playtest to see whether perception matches the math. Change one lever and repeat.
Exercise
An option pays 30 with probability 0.2 and -4 with probability 0.8. A safe option pays a guaranteed 3. Compute the expected value of the gamble, and say whether the gamble or the safe option is dominated by the other. Then name one lever you could change to make the gamble worth considering.
Show answer
The gamble's expected value is 0.2 30 + 0.8 (-4) = 6 - 3.2 = 2.8. The safe option averages 3 with zero spread. The gamble has a lower average and a larger spread, so the safe option dominates it and the gamble is never worth choosing. You could raise the payoff (for example from 30 to 40, which gives an expected value of 4.8), raise the success probability, or reduce the penalty for failure. After the change, recompute both expected value and standard deviation to confirm that the gamble now offers a higher average in exchange for its volatility.