Sub topic 7
Feedback loops that shape a match
This chapter assumes you have read the earlier chapters on simple rules, local interaction and shared state. It also assumes you can read short Python programs. A feedback loop is a way for rules to interact over time. It decides whether a match drifts toward a runaway win, a stalemate, or a close finish.
What a feedback loop is
A feedback loop exists when the result of a rule changes the input of the same rule on a later tick or turn. A rule like "income depends on gold" is not a loop by itself. It becomes one when income adds to gold, because gold then feeds the next income calculation.
Feedback loops come in two kinds. The names describe the direction of the effect, not whether it is good or bad.
- Positive feedback (also called reinforcing feedback) amplifies a change. A small lead makes a larger lead.
- Negative feedback (also called balancing feedback) opposes a change. A large lead makes the lead smaller, or a large deficit makes the deficit smaller.
Neither kind is a flaw. Positive feedback makes matches decisive and gives early decisions weight. Negative feedback keeps matches open and gives trailing players a reason to keep playing. Trouble starts when one kind dominates by accident.
Positive feedback in practice
Positive loops are common because most games reward success with resources, position or information. Each reward makes the next success easier.
| Game situation | The loop |
|---|---|
| Economy game | More gold buys more producers, which earn more gold |
| Shooter or MOBA | A kill gives gear or experience, which makes the next kill likelier |
| Territory game | More territory gives more income, which pays for more expansion |
| Fire on a grass map | More burning tiles ignite more neighbors, which creates more burning tiles |
Positive feedback tends to produce a snowball: the early lead compounds until the match outcome is clear long before the match ends. The mathematical signature is exponential growth. Interest of 5% per turn doubles a stock in about 14 turns, and that rate does not slow down by itself.
A positive loop is often bounded by something else. The fire example stops spreading when it runs out of fuel or hits a water tile. The loop has not turned negative. It has simply hit a limit. Designers often rely on such limits (a map edge, a resource cap, a finite supply of fuel) to keep a positive loop from running forever.
Positive loops are not only a problem. They create tension and escalation, and they end matches. A strategy game with no positive feedback can drag on because no player can ever get ahead decisively. The design question is how fast the loop runs and whether the trailing player still has a chance to interrupt it.
Negative feedback in practice
Negative loops pull a system back toward balance. In games they appear in two forms.
- Built-in costs that grow with success. Army upkeep rises as your army grows. Each extra city costs more to administer. Diminishing returns make the tenth worker less useful than the first.
- Explicit catch-up mechanics. The trailing player gets a bonus. Racing games speed up the cars in last place ("rubber banding"). Board games give the player in last place better draws.
Negative feedback stabilizes matches, but it has costs of its own.
- Leaders feel punished. If playing well makes the game harder, players notice and resent it.
- Players can game it. If being behind pays a bonus, a clever player may stay behind on purpose and strike late. This is called sandbagging, and it is an exploit you will meet again in the chapter on exploits.
- It hides skill. If catch-up is strong enough, the result no longer reflects who played better.
A worked example: two terms, two directions
The following function from the topic examples has one positive term and one negative term.
def income(gold, leader_gold, base=10, interest=0.05, catch_up=0.1):
"""Per-turn income for one player.
interest is a positive feedback term: more gold earns more gold.
catch_up is a negative feedback term: a bigger gap behind the leader earns more.
"""
return base + interest * gold + catch_up * (leader_gold - gold)
leader, trailer = 200, 100
print(income(leader, leader)) # 20.0
print(income(trailer, leader)) # 25.0The leader earns 20 and the trailer earns 25. At these settings the trailer gains faster, so the gap shrinks. The interest term helps whoever has more gold, and the catch_up term helps whoever has less. They compete.
You can predict the outcome without running a simulation. Let the gap be g = leader_gold - trailer_gold. Each turn the leader gains base + interest * leader_gold and the trailer gains base + interest * trailer_gold + catch_up * g. The base terms cancel when you subtract, which leaves:
new_gap = g + interest * g - catch_up * g = g * (1 + interest - catch_up)
The gap is multiplied by 1 + interest - catch_up every turn. That gives three regimes.
- If
catch_up < interest, the factor is above 1 and the gap grows. The positive loop wins. - If
catch_up == interest, the factor is exactly 1 and the gap stays constant. - If
catch_up > interest, the factor is below 1 and the gap shrinks. The negative loop wins.
The next program confirms this by simulating ten turns for three values of catch_up.
def income(gold, leader_gold, base=10, interest=0.05, catch_up=0.1):
return base + interest * gold + catch_up * (leader_gold - gold)
def simulate(turns, interest, catch_up, a=200.0, b=100.0):
"""Player a starts as leader. Returns the final gap a - b."""
for _ in range(turns):
leader = max(a, b)
# Compute both incomes from the same snapshot, then apply them.
gain_a = income(a, leader, interest=interest, catch_up=catch_up)
gain_b = income(b, leader, interest=interest, catch_up=catch_up)
a += gain_a
b += gain_b
return a - b
for catch_up in (0.0, 0.05, 0.1):
gap = simulate(10, interest=0.05, catch_up=catch_up)
print(f"catch_up={catch_up}: gap after 10 turns = {gap:.2f}")The output is:
catch_up=0.0: gap after 10 turns = 162.89
catch_up=0.05: gap after 10 turns = 100.00
catch_up=0.1: gap after 10 turns = 59.87These match 100 * 1.05^10 = 162.89, 100 * 1.0^10 = 100, and 100 * 0.95^10 = 59.87. The starting gap is 100.
Note that the simulation computes both incomes from the same snapshot before applying either. If you updated a first and then computed b's income from the new a, you would give one player a slightly different leader value than the other. That is a subtle ordering bug, and it is a common one in shared-state simulations.
Seeing both loops in one picture
The diagram below shows the same economy as a set of causal links. The inner cycle reinforces the lead. The outer path pushes against it.
When you design with loops, draw them like this before you tune numbers. Each arrow is a rule. Each cycle is a loop. If you cannot find a cycle that returns to its start, you do not have a feedback loop there.
Loops come from local rules
Earlier chapters showed that global patterns come from local rules acting on shared state. Feedback loops are one reason that happens. The fire grid has no rule that says "fire spreads in waves." Each burning tile only ignites its flammable neighbors, and the new burning tiles then do the same thing. The loop (fire creates fire) is a property of the rule and the shared grid together, and nobody wrote it down as a feature.
This means you often find loops by asking where a rule's output lands. If a rule changes state that the same rule, or a rule it depends on, reads later, there is a loop. Designers who only read rules one at a time often miss them.
Delays, overshoot and oscillation
Real loops often have delays. A catch-up bonus that is computed from last turn's standings reacts late. Negative feedback with a delay can overshoot: the trailer gets so much help that it becomes the leader, then the old leader receives the bonus, and the lead swings back and forth.
In the model above, overshoot appears when catch_up exceeds 1 + interest. The gap factor then becomes negative, which means the two players swap places every turn. The sign flips because the trailer's income advantage is larger than the whole gap. Choose catch-up strength well below that threshold. A factor between 0 and 1 gives a smooth convergence. A factor below 0 gives oscillation.
Common errors
- Tuning one loop and forgetting the other. If you raise interest to make the economy more exciting, you also increase the strength of the positive loop. The catch-up term may no longer be enough. Check the net factor, not each term alone.
- Stacking hidden loops. A kill gives gold, gold buys gear, gear wins fights, and fights give kills. Each link seems harmless. The combined loop can be much stronger than any single rule suggests.
- Treating catch-up as a fix for a weak game. Negative feedback can disguise a lack of meaningful decisions. If the trailing player always wins back, early choices stop mattering.
- Ignoring the cap. A positive loop with no ceiling produces numbers that outgrow the rest of the game. Decide where it saturates.
- Using strict equality as a goal. A perfectly balanced loop (factor exactly 1) is rarely what you want. Slightly positive gives decisive matches, and slightly negative gives close ones. Pick the direction deliberately.
A practical checklist
Use this list when you add or review a resource or scoring rule.
- Write down the stock (what accumulates) and every rule that changes it.
- For each rule, check whether its inputs include the stock it changes. If so, mark a loop.
- Classify each loop as reinforcing or balancing by asking what happens to a small lead after one tick.
- Estimate the net factor per turn, as in the gap formula above, and check which regime you are in.
- Look for a limit or cap on each reinforcing loop.
- Look for delays in balancing loops, and check for overshoot.
- Ask whether a player could profit by staying behind or by triggering a bonus on purpose.
What comes next
Feedback loops are one source of surprising behavior, and the next chapters ask how much of that behavior you can predict and how you should respond when players find strategies you did not intend. For now, keep the central idea: a rule that reads the state it writes will shape the whole match, so find it and measure it.
Exercise
In the income function, set interest=0.08 and catch_up=0.05. A leader has 300 gold and a trailer has 150 gold. Will the gap grow or shrink each turn, and by what factor? What is the gap after one turn?
Show answer
The gap is multiplied each turn by 1 + interest - catchup = 1 + 0.08 - 0.05 = 1.03. It grows, because catchup is smaller than interest, so the positive loop wins. The starting gap is 150, so after one turn it is 150 * 1.03 = 154.5.
Exercise
A designer adds a rule that gives the trailing player a bonus equal to 0.1 times the gap, computed from the previous turn's standings. Players report that the lead changes hands every turn and the result feels random. Name the problem and give two ways to fix it.
Show answer
This is overshoot caused by delayed, overly strong negative feedback. The bonus reacts to an old gap, so the trailer overtakes the leader and the roles swap each turn. Two fixes: reduce the catch-up coefficient so the net gap factor stays between 0 and 1, and compute the bonus from the current standings instead of last turn's. Capping the maximum bonus also limits the swing.