Sub topic 7
Feedback Loops That Shape a Match
Assume you know loops, functions, dictionaries, and sets. You should also understand a game loop that updates shared state in turns or ticks. This chapter uses those ideas to explain how feedback changes the direction and pace of a match.
What a feedback loop is
A feedback loop occurs when the result of a rule changes the conditions that control the rule later. In a game, an action can make the next action more or less effective.
A positive feedback loop amplifies an existing advantage. A player who is ahead gains tools that help them get further ahead. A negative feedback loop reduces a difference. A player who is behind receives a benefit that helps close the gap.
The words positive and negative describe the direction of change, not whether the loop is good or bad.
| Loop type | Effect on an advantage | Common game result |
|---|---|---|
| Positive feedback | Makes the advantage larger | Snowballing, faster victories |
| Negative feedback | Makes the advantage smaller | Comebacks, closer matches |
Positive feedback: advantage grows
Suppose a player earns gold by controlling territory. Gold buys units, and more units help control more territory. The same resource appears in each stage of the loop:
- Control territory.
- Earn gold.
- Buy units.
- Capture more territory.
- Earn even more gold.
This loop can make a match exciting because decisions have visible consequences. It can also make the result inevitable too early. Once one player has enough territory, the other player may have no practical way to recover.
A positive loop does not need to be removed. You can limit its strength by adding costs, delays, contested objectives, or ways to attack the source of the advantage.
Negative feedback: differences shrink
Negative feedback pushes the game toward a smaller gap. For example, a racing game might give trailing drivers a temporary speed boost. The boost does not need to make the trailing driver win. It only needs to make catching the leader possible.
A strategy game can use income based on the difference from the leader:
def income(gold, leader_gold, base=10, interest=0.05, catch_up=0.1):
"""Return one player's income for the next turn."""
return base + interest * gold + catch_up * (leader_gold - gold)
leader = 200
trailer = 100
print(income(leader, leader)) # 20.0
print(income(trailer, leader)) # 25.0The interest term is positive feedback. More gold produces more income. The catch-up term is negative feedback. A larger gap behind the leader produces more income.
Changing either coefficient changes the match. If interest is much larger than catch_up, the leader is likely to pull away. If catch_up is too large, early success may not matter because the game constantly erases it.
Find loops in the state
To analyze a feedback loop, trace a value through several updates:
- What value changes?
- What rule reads that value?
- What new advantage or disadvantage does the rule create?
- Does that result change the original value?
For example, “more units” may increase territory, which increases income, which creates more units. That is a positive loop.
The same state can participate in several loops. More units might also increase supply costs. The income loop pushes expansion, while the cost loop limits it. The final match behavior depends on which loop is stronger at each stage.
Predict the effect before changing values
Do not tune a feedback parameter from one impressive match. First state your prediction.
For example:
- Increasing interest should make early leads grow faster.
- Increasing catch-up should shorten the distance between players.
- Increasing upkeep should slow expansion after a player builds a large army.
- Adding a delay should give the trailing player time to respond.
Then test the prediction across different starting states. Run matches where each player starts ahead, behind, or tied. Record when the lead appears, how large it becomes, and whether a losing player still has useful choices.
Exercise
Exercise
A player who controls more mines earns more money. Money buys miners, and miners capture mines faster. The opponent can destroy miners, but destruction is expensive. Is the main loop positive or negative, and what is one way to prevent an early lead from becoming certain victory?
Show answer
The main loop is positive because control creates money, money creates miners, and miners create more control. Add a strong counter such as affordable miner attacks, contested mines, upkeep, or a delayed benefit so the opponent retains meaningful choices.