Sub topic 13
Testing and tuning: checking that choices are really used
This chapter assumes you know the earlier ideas in this tutorial: opportunity cost, trade-off axes, dominated options, risk and reward, telegraphing, and choice overload. It also assumes you can read short Python scripts. The goal is to check whether the choices you designed are actually the choices players make.
Why designed choices need testing
A designer can build a menu of five options and believe it holds five viable plans. Players may use two of them. One option may be so strong that everyone takes it. Another may look strong but hurt players who pick it. Reasoning about the design is not enough, because players find patterns you did not see.
A choice is working when several options are picked for real reasons and picking each one leads to different outcomes. Testing looks for places where that is false.
There are two kinds of evidence:
- Observation (playtests): you watch people, listen to them and ask why. This tells you what they understood and how they felt.
- Data (logs and simulations): you count what happened across many sessions. This tells you what players did and how often.
Each has a blind spot. Observation covers few players. Data cannot tell you why someone chose something. Use both, and treat disagreement between them as a clue.
What the numbers tell you
Start with a few metrics for each option in a set.
| Metric | What it measures | What a bad value suggests |
|---|---|---|
| Pick rate | How often an option is chosen when it is offered | Very high: possible dominant option. Very low: ignored or dominated option. |
| Win rate (or success rate) | How often players who chose it reach a good outcome | High pick rate with low win rate: a trap. Low pick rate with high win rate: a hidden gem or a poorly telegraphed option. |
| Regret rate | How often players switch away, undo, or say they wish they had chosen differently | High: consequences were not readable. |
| Decision time | How long players spend before choosing | Very short: obvious choice or no attention. Very long: overload or unclear information. |
| Context spread | Whether pick rate varies by player skill, build, level or situation | Flat across contexts: the choice ignores the player's situation. |
Pick rate alone is misleading. If an option is offered only when the player is losing, its pick rate will be high for that reason. Always compare pick rate within the situations where the option was available.
A fair-share baseline
If a player sees three options and chooses at random, each has a one-in-three chance. The more options in the set, the lower the fair share. So a 30% pick rate means different things in a set of 3 and a set of 10.
A useful measure is lift: the actual number of picks divided by the number you would expect if every offer were chosen at random. A lift of 1.0 means "chosen as often as chance." Above 1.5 deserves a look. Below 0.5 deserves a look.
from collections import Counter
def analyze(logs, high=1.5, low=0.5):
"""logs is a list of (offered_options, chosen_option) pairs."""
picked = Counter()
expected = Counter()
for offered, chosen in logs:
picked[chosen] += 1
for name in offered:
expected[name] += 1 / len(offered)
report = {}
for name in expected:
lift = picked[name] / expected[name]
if lift > high:
flag = "overpicked"
elif lift < low:
flag = "ignored"
else:
flag = "ok"
report[name] = (lift, flag)
return report
offer = ("Sword", "Axe", "Bow")
logs = (
[(offer, "Sword")] * 12
+ [(offer, "Axe")] * 6
+ [(offer, "Bow")] * 2
)
report = analyze(logs)
for name, (lift, flag) in sorted(report.items(), key=lambda x: -x[1][0]):
print(f"{name}: lift {lift:.2f} ({flag})")The script prints:
Sword: lift 1.80 (overpicked)
Axe: lift 0.90 (ok)
Bow: lift 0.30 (ignored)Because it divides by the fair share, the function handles offers of different sizes. A flag is a question, not a verdict. The next sections cover how to answer it.
Reading the patterns
Overpicked options
An option with high lift and high win rate may be a dominant option. Go back to the trade-off axes. Is it better on every axis that matters, or cheaper to get? You can reuse the dominance check from the earlier chapter on dominant and dominated options, but notice its limit. It only compares the axes you listed. A real game has hidden axes such as reliability, synergy with other items, and how easy the option is to use. If the numbers say an option is never worse than the others, look for an axis you forgot to model.
An option can also be overpicked for a reason that is not a design flaw. New players often choose the simplest option because it is easy to understand. Check whether pick rate falls as skill rises. If it does, the option may be a good default, not a dominant strategy.
Ignored options
Low pick rate has several possible causes, and the fix depends on which one applies:
- The option is dominated. Another option beats it. Fix the numbers or give it a new axis of strength.
- The option is poorly telegraphed. Players do not understand what it does. Improve its description, preview or feedback.
- The option is niche. It is strong only in rare situations. This is fine if those situations arise and players can recognize them.
- The option is too risky or too costly for its payoff. Compare expected values, but also variance.
- The option is hidden or buried in a long menu, which is a choice overload problem.
To tell these apart, watch players. Ask them to think aloud. If a player says "I didn't know what that did," the cause is telegraphing. If they say "that's just worse than the axe," it is dominance.
The trap
If pick rate is high and win rate is low, players are choosing something that does not serve them. This is a feedback failure. Either the option looks better than it is, or the consequences arrive too late for players to connect them with the choice. Check the telegraphing chapter's advice: show the cost before the player commits, and show the result soon after.
Checking risk and reward with numbers
Risky options are the hardest to judge by pick rate, because a gamble loses often even when it is well designed. Compare the average payoff first, then look at the spread.
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 average, but that does not make it the right choice. A player who needs at least 10 points to survive should take the safe reward. A player who is far behind and needs 25 should gamble. The choice is meaningful only if both players exist in your game.
To test this, split results by situation. Group players by how far ahead or behind they were when they chose. Healthy risk design shows a context spread: safe options are picked more by players ahead, and gambles more by players behind. If the gamble is picked equally in every situation, either its average is too good or players are ignoring the situation.
Simulation and bots
Before real players arrive, you can run cheap tests with simple bots:
- A random bot picks uniformly. It shows how options perform with no skill. An option that wins far more often than the others even for the random bot is probably too strong.
- A greedy bot always takes the option with the best immediate value. If it beats everything else, your choices reward short-term thinking and the long-term options are weak.
- A fixed-strategy bot always picks the same option. If one fixed strategy wins nearly always, you have a dominant strategy.
Simulation is fast and repeatable, but bots do not read descriptions, feel tension, or misunderstand things. They test the numbers, not the telegraphing. Treat simulation as a screen for balance problems and leave understanding to human playtests.
A tuning loop
Tuning works best as a small, repeated cycle, with one change at a time.
Change one thing at a time. If you change an option's cost, its description and its damage together, you cannot tell which change fixed the problem. Write down the hypothesis before you change anything: "Bow is ignored because its range is not shown. If I add a range preview, its lift should rise above 0.5."
Tune toward variety, not equality
A common mistake is to push every option to the same pick rate. Equal pick rates are not the goal. Options should be chosen for different reasons in different situations. An option picked 10% of the time overall can be essential if it is the right answer in a common situation that arises one time in ten. Check pick rate by situation before nerfing or boosting.
Small samples
Do not tune from a handful of sessions. With 20 picks, the difference between a 30% and a 45% pick rate is mostly noise. Use these habits:
- Wait for a few hundred decisions per option before acting on numbers.
- Treat early playtest data as direction, not proof.
- Beware of a novelty effect: players try new options once to see them, which inflates early pick rates.
- Beware of survivorship: if weak players quit early, later data comes from a more skilled group.
Common errors
- Treating a high pick rate as proof of a good choice. It may mean the option is dominant or the alternatives are unclear.
- Treating a low pick rate as proof of a bad option. It may be a good option for a rare situation.
- Ignoring context. Pick rate averaged over all situations hides the situational choices that make a game interesting.
- Measuring only the numbers. Data shows what players do. Only players can tell you what they misunderstood.
- Changing several things at once. You lose the ability to learn from the result.
- Balancing for the average player. Beginners and experts may need different information, and an option can be a trap for one group and a strong choice for the other.
Exercise
In a playtest of 100 offers, each showing the same three upgrades, the Shield upgrade was chosen 8 times, the Boots 46 times and the Ring 46 times. Compute the lift for Shield, say whether it is flagged with the thresholds 1.5 and 0.5, and name two further checks before you decide to buff it.
Show answer
The expected picks for each upgrade are 100 / 3, about 33.3. Shield's lift is 8 / 33.3, about 0.24, which is below 0.5, so it is flagged as ignored. Before buffing it, (1) watch players or ask them whether they understood what Shield does, to rule out a telegraphing problem, and (2) check whether another upgrade dominates it, or whether it is a niche option that wins in a situation these 100 offers did not cover. Also compare its win rate and its pick rate by situation.
Exercise
A gamble pays 30 with probability 0.4 and 0 otherwise. A safe option pays 10 for certain. Calculate both expected values, then describe what you would look for in the logs to see whether the choice is meaningful.
Show answer
The gamble's expected value is 0.4 * 30 = 12, and the safe option's is 10. The gamble has the higher average, but the choice is meaningful only if the best pick depends on the player's situation. In the logs, check whether players who are ahead or who need a guaranteed amount choose the safe option more often, and whether players who are behind choose the gamble more often. If the gamble is picked at the same rate in every situation, players are ignoring the situation, or its average is too attractive.