Master

Balancing a game by measurement, not by play

Playing to judge balance is judging one player. The measurement is a bot that plays the curve with a fixed policy, so the difficulty at each point is a number rather than an opinion. The curve is then adjusted against numbers that a person can argue about.

What you will see

The number, the cause, and the change. A balance note without the number is not a note.

About 1 min of reading

Quick check

Before this new lesson, one small question about the lesson you just finished. Recall it, do not look it up.

Try It

Measure the curve with a bot

1

Write the policy

printf 'function policy(w) { return (w.nextGap < 90 && w.grounded) ? "jump" : "run"; } ' | tee game/bot.js

Before you run it, say out loud what it will print. Then open the answer.

What it prints
Ten lines, one decision. The policy is printed in the report so it can be argued with.
2

Run at each point

printf 'for (let i = 0; i <= 10; i++) { const p = i / 10; let s = 0; for (let k = 0; k < 40; k++) s += botSurvives(at(p)) ? 1 : 0; console.log(p, s / 40); } ' | tee -a game/bot.js

Before you run it, say out loud what it will print. Then open the answer.

What it prints
Eleven lines of progress and survival rate.
3

Find the cliff

read the printed rates and find where the drop between two points is largest

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One pair of points. That pair is the wall the player hits, and it is a number now.
4

Change the curve from the number

printf 'cliff at p 0.6 to 0.7: gap 96 to 78; new gap curve caps at 88 (2026-10) ' | tee -a docs/balance.md

Before you run it, say out loud what it will print. Then open the answer.

What it prints
The number, the cause, and the change. A balance note without the number is not a note.
Do not report a survival rate without the policy that produced it. Another player's rate is not comparable to yours.

Data Flow

Curve to a survival number
1 Pick a policy
↓
2 Run the bot at each progress point
↓
3 Count survivals per point
↓
4 Report the curve and the change made
Why this works
What the number is for

It is for a decision. A survival rate that nobody acts on is decoration, so the report names the change made from it.

Where the bot lies

A bot that plays better than a human can play measures the ceiling, not the experience. Run a second sloppier policy and report both.

Examples

One policy, many runs

A bot that jumps when an obstacle is close and otherwise runs is a policy in ten lines. Its survival rate per progress point is the measurement.

Read the survival curve

Print survival at ten progress points. A cliff from ninety percent to ten percent between two points is the wall, and the print names it.

Fix the curve, not the bot

If the bot is wrong, the measurement is wrong. State the policy in the report so a reader can disagree with the number and say why.

← Juice: making the state visible without changing it
Previous Lesson
Juice: making the state visible without changing it
Next Lesson
Telemetry that shows the game in the wild
Telemetry that shows the game in the wild →