Sub topic 8
Balancing skill and luck
This chapter assumes you know expected value and variance from the earlier chapters. It also assumes you can read short Python functions. It covers how to decide how much of a game's outcome comes from player decisions and how much comes from chance, and how to measure that mix.
Skill and luck are two sources of variation
In any match, the result depends on two things. Skill is the part a player controls and can improve with practice. Luck is the part the player cannot control. Neither is good or bad on its own. The question is whether the mix suits the people you are designing for.
A useful working model is the skill gap. It is the difference in ability between two players, measured in the same units as the random part of the game. Take a contest where each player adds a die roll to a fixed bonus. A bonus of 2 over a d6 is a different thing from a bonus of 2 over a d20. The same skill gap is decisive in one case and nearly irrelevant in the other.
So you never balance skill against luck in the abstract. You compare the spread of the random part with the spread of the skill part.
The spectrum
Games sit along a line from pure skill to pure luck.
Two points on the line are worth noting.
- Chess has no randomness in the rules, but the better player wins nearly every game. This gives low variance, and a weaker player has almost no chance on any given day.
- Poker has heavy luck in a single hand, but skill dominates across thousands of hands. The same game can look like a luck game over one session and a skill game over a year.
That second point matters for design. Skill expresses itself through repetition. The more independent random events a result averages over, the more the skill signal shows up.
Measuring the mix: win rate against skill gap
The most direct measure is how often the better player wins. The simulation from the spine does this for a die-roll contest. Player A rolls a d6 and adds a fixed bonus. Player B rolls a d6 with no bonus.
import random
def win_rate(skill_gap, trials=10000, seed=1):
rng = random.Random(seed)
wins = 0
for _ in range(trials):
a = skill_gap + rng.randint(1, 6)
b = rng.randint(1, 6)
wins += a > b
return wins / trials
for gap in (0, 1, 2, 3):
print(gap, win_rate(gap))You can also compute the exact answer by listing all 36 outcomes. Use this to check the simulation.
from itertools import product
def exact_win_rate(skill_gap, sides=6):
wins = sum(
1
for x, y in product(range(1, sides + 1), repeat=2)
if x + skill_gap > y
)
return wins / sides ** 2
for gap in range(0, 7):
print(gap, round(exact_win_rate(gap), 3))The exact values are:
| Skill gap (bonus) | Exact win chance for the better player |
|---|---|
| 0 | 0.417 (ties make up another 0.167) |
| 1 | 0.583 |
| 2 | 0.722 |
| 3 | 0.833 |
| 4 | 0.917 |
| 5 | 0.972 |
| 6 | 1.000 |
The simulated numbers in the first script should land close to these, but not match them exactly. At a gap of 0, A "wins" only 41.7% of the time because a tie counts as a non-win for both sides. That is a common bug in contests like this, so decide up front how ties resolve.
The table also shows that a bonus of 3, which is half the range of the die, gives only an 83% win rate. In a single match, the weaker player still wins about one time in six. Whether that is acceptable is a design decision, not a math question.
Choosing a target
Pick a target win rate for the better player, then tune the game until the simulation hits it. Different audiences want different targets.
- A party game for mixed groups often wants the best player to win only slightly more than their fair share, perhaps 55 to 65% against a novice. Novices stay engaged because they could win.
- A competitive ladder wants the better player to win consistently, often above 75 to 90%, so ratings mean something.
- A children's game may want near-pure luck, so that a child and an adult have equal chances.
Write this target down before you tune. Without it, "balanced" just means "feels okay to the designer", and designers are usually the most skilled players.
Levers for moving the balance
You can shift the mix in either direction with a few levers.
- Change the die size. A d20 has a wider spread than a d6, so a fixed bonus matters less.
- Roll more dice and sum them. Summed dice cluster around the average, so the random spread grows more slowly than the maximum. This favors skill.
- Add decisions between random events. Each decision is a chance for skill to matter.
- Lengthen the game. More random events average out, so the better player wins more often.
- Make randomness input rather than output. As covered earlier, input randomness lets players respond to what they see, which rewards skill.
- Add catch-up or recovery rules. These pull the result back toward luck, which helps weaker players (covered in a later chapter).
Lengthening the game is the lever people forget. If your simulation shows an 83% win rate for a given gap in one round, a best-of-five contest will push it higher. You can test that by changing the simulation to play several rounds and count who wins the majority.
Common errors
- Balancing on one match. A game with 70% single-match win rate for the better player can still produce shocking upsets in a tournament of a few matches. Evaluate at the scale players actually experience.
- Ignoring ties. Ties shift every win-rate number. Decide how they resolve and include that in the simulation.
- Tuning for yourself. Experienced players find luck frustrating. New players find skill-heavy games hostile. Define the audience first.
- Hiding skill. If players cannot see how their choices affected the result, they will blame luck even in a skill-heavy game. The balance has to be visible as well as real.
- Believing a mix is a fixed property of the game. It depends on how many players, how long the game runs, and how experienced the players are.
Exercises
Exercise
In the die contest above, a player has a +2 bonus on a d6 against an opponent with no bonus. The exact win chance is 26/36, about 72%. You want the better player to win about 90% of the time in a single roll-off. Using the exact table, what bonus gets closest, and what does that bonus equal as a share of the die's range?
Show answer
A bonus of 4 gives 33/36, about 91.7%, which is the closest to 90%. A bonus of 3 gives 83.3%, and a bonus of 5 gives 97.2%. A bonus of 4 is 4 out of the 6 faces, so about two thirds of the die's range.
Exercise
A designer says "our card game is balanced because in 10,000 simulated games the better bot won 62% of the time." Name two things you would check before trusting that number.
Show answer
First, check how ties and draws were counted, since they change the win rate. Second, check that the simulated skill gap and game length match what real players will experience. Other valid checks are whether the bots play the same way human players do, and whether the result was compared against an exact calculation in a simple case.