Example
Success to the Successful
Level: Beginner
What it shows
Funding by last period's output turns a 5% productivity edge into a budget Gini of 0.84. Redistributing 30% of the pool holds that gap near 0.057.
How to use
Open the model in the playground, change one parameter in the YAML, and run it again. The annotated simulation.py below is the model. Each config is a saved scenario: Performance Only, Redistribute 30%.
Key parameters
System Archetypes
Learn recurring structural patterns like Limits to Growth, Fixes That Fail, and Tragedy of the Commons, plus high-leverage interventions.
Take the QuizSuccess to the Successful
Two projects share one budget. Each round, funding follows last round's
output, so a small productivity edge compounds into a wider lead. The knob
is redistribute_fraction: the share of the pool handed back equally
before performance takes the rest. At zero the reinforcing loop has no
interior balance, and after 50 rounds the budget Gini is about 0.84,
still climbing toward 1. At 0.30 the same 5% edge settles near
0.057.
from tys import probe, progress
Two-project gap: 0 when the two values match, 1 when one side holds the pool. For two actors this is |A − B| / (A + B), which reads winner-take-all as 1.
def gini(a: float, b: float) -> float:
total = a + b
return 0.0 if total == 0 else abs(a - b) / total
Split one budget by last period's output, with an optional equal floor.
def simulate(cfg: dict):
import simpy
env = simpy.Environment()
budget_pool = float(cfg["budget_pool"])
prod_a = float(cfg["productivity_A"]) # the small edge over project B
prod_b = float(cfg["productivity_B"])
redistribute = float(cfg["redistribute_fraction"]) # KNOB: share returned equally
sim_time = int(cfg["sim_time"])
Equal start. Output is scored immediately, so round 1 already sees the edge. The allocation is deterministic: the same config always draws the same charts.
budget_a = budget_pool / 2
budget_b = budget_pool - budget_a
output_a = prod_a * budget_a
output_b = prod_b * budget_b
time_to_dom = None
done = env.event()
Sample on a half-step cadence so each probe is a line, not an end-state dot.
def recorder():
while True:
probe("budget_A", env.now, budget_a)
probe("budget_B", env.now, budget_b)
probe("output_A", env.now, output_a)
probe("output_B", env.now, output_b)
probe("gini_budget", env.now, gini(budget_a, budget_b))
probe("gini_output", env.now, gini(output_a, output_b))
yield env.timeout(0.5)
env.process(recorder())
Where the lead runs away
A fraction of the pool is split evenly. The rest follows last round's output. At a fraction of zero, a lead this round is a larger share next round, and there is no interior balance: the gap widens until one project holds the pool. A positive fraction leaves the other project enough budget to keep producing, and the gap settles.
def dynamics():
nonlocal budget_a, budget_b, output_a, output_b, time_to_dom
for t in range(sim_time):
total_output = output_a + output_b
share_a = 0.5 if total_output == 0 else output_a / total_output
share_b = 1.0 - share_a
pct = int(100 * (t + 1) / sim_time)
if time_to_dom is None and max(share_a, share_b) >= 0.8:
time_to_dom = t
progress(pct, "one project now earns at least 80% of the output")
else:
progress(pct)
base = redistribute * budget_pool / 2
variable = (1.0 - redistribute) * budget_pool
budget_a = base + variable * share_a
budget_b = base + variable * share_b
output_a = prod_a * budget_a
output_b = prod_b * budget_b
yield env.timeout(1)
progress(100)
done.succeed({
"final_budget_A": budget_a,
"final_budget_B": budget_b,
"final_gini_budget": gini(budget_a, budget_b),
"final_gini_output": gini(output_a, output_b),sim_time means the 80% line was never crossed.
"time_to_dominance": time_to_dom if time_to_dom is not None else sim_time,
})
env.process(dynamics())
env.run(until=done)
return done.value
def requirements():
return {"external": ["simpy==4.1.1"]}
# competitive.yaml — the default. Nothing is shared back, so a 5% edge runs the budget Gini to 0.84.
# Every other knob matches redistribute.yaml. Nothing here is random.
budget_pool: 100
productivity_A: 1.05
productivity_B: 1.0
redistribute_fraction: 0.0
sim_time: 50
Budget of the slightly more productive project: about 92 of the pool under Performance Only, and about 53 when 30% is handed back equally.
| Samples | 101 @ 0.00–50.00 |
|---|---|
| Values | min 50.00, mean 75.58, median 78.05, max 91.98, σ 12.32 |
Budget of the other project: starved to about 8 when funding follows output alone, and held near 47 when 30% of the pool is shared back.
| Samples | 101 @ 0.00–50.00 |
|---|---|
| Values | min 8.02, mean 24.42, median 21.95, max 50.00, σ 12.32 |
Output of project A, its budget times 1.05, which is the score the next round uses when it splits the pool.
| Samples | 101 @ 0.00–50.00 |
|---|---|
| Values | min 52.50, mean 79.36, median 81.95, max 96.58, σ 12.94 |
Output of project B, its budget times 1.0, so the same budget always scores 5% less than project A.
| Samples | 101 @ 0.00–50.00 |
|---|---|
| Values | min 8.02, mean 24.42, median 21.95, max 50.00, σ 12.32 |
Budget gap on a 0-to-1 scale, |A − B| / (A + B): Performance Only climbs through about 0.84 and is still widening, while Redistribute 30% settles near 0.057.
| Samples | 101 @ 0.00–50.00 |
|---|---|
| Values | min 0.00, mean 0.51, median 0.56, max 0.84, σ 0.25 |
| Metric | Value |
|---|---|
| final_budget_A | 91.98 |
| final_budget_B | 8.02 |
| final_gini_budget | 0.84 |
| final_gini_output | 0.85 |
| time_to_dominance | 28.00 |
# redistribute.yaml — the contrast. Handing 30% back equally holds the same edge to a Gini near 0.057.
# Same pool, productivities, and horizon as competitive.yaml. Only the floor changes.
budget_pool: 100
productivity_A: 1.05
productivity_B: 1.0
redistribute_fraction: 0.3
sim_time: 50
Budget of the slightly more productive project: about 92 of the pool under Performance Only, and about 53 when 30% is handed back equally.
| Samples | 101 @ 0.00–50.00 |
|---|---|
| Values | min 50.00, mean 52.69, median 52.83, max 52.83, σ 0.42 |
Budget of the other project: starved to about 8 when funding follows output alone, and held near 47 when 30% of the pool is shared back.
| Samples | 101 @ 0.00–50.00 |
|---|---|
| Values | min 47.17, mean 47.31, median 47.17, max 50.00, σ 0.42 |
Output of project A, its budget times 1.05, which is the score the next round uses when it splits the pool.
| Samples | 101 @ 0.00–50.00 |
|---|---|
| Values | min 52.50, mean 55.33, median 55.47, max 55.47, σ 0.44 |
Output of project B, its budget times 1.0, so the same budget always scores 5% less than project A.
| Samples | 101 @ 0.00–50.00 |
|---|---|
| Values | min 47.17, mean 47.31, median 47.17, max 50.00, σ 0.42 |
Budget gap on a 0-to-1 scale, |A − B| / (A + B): Performance Only climbs through about 0.84 and is still widening, while Redistribute 30% settles near 0.057.
| Samples | 101 @ 0.00–50.00 |
|---|---|
| Values | min 0.00, mean 0.05, median 0.06, max 0.06, σ 0.01 |
| Metric | Value |
|---|---|
| final_budget_A | 52.83 |
| final_budget_B | 47.17 |
| final_gini_budget | 0.06 |
| final_gini_output | 0.08 |
| time_to_dominance | 50.00 |
- What sets the tipping point?
- The break is at a redistribution of zero. With redistribute_fraction at 0, the whole pool follows last period's output, and the only stable splits are nothing and everything: the more productive project earns a larger share, which buys it a still larger share. Any positive floor changes the structure. Each project is guaranteed that fraction of the pool, split evenly, before performance is scored, so the weaker project keeps producing and an interior balance appears. The default leaves the fraction at 0. After 50 rounds the budget Gini is 0.840 and still climbing; give the same run a few hundred rounds and the gap reaches 1. The contrast changes only that fraction, to 0.30, and the same 5% edge settles at 0.057.
- Why does only the redistribution fraction differ between the two runs?
- The pool, both productivities, the equal start, and the 50-round horizon are frozen. Project A is 5% more productive in both. Performance Only therefore ends with budgets of about 92 and 8, a Gini of 0.840. Redistribute 30% ends at about 53 and 47, a Gini of 0.057. The allocation itself is deterministic, so those two end states are the same on every build.
- Why doesn't the lead reach a Gini of 1 inside the default run?
- Because 50 rounds is mid-climb, not the finish. With no floor the lead keeps compounding: about 0.84 at round 50, about 0.96 at round 80, and essentially 1 if the horizon is a few hundred rounds. The chart is still rising at the right edge on purpose. The contrast has already flattened by then, which is how you can tell a runaway loop from a settled one without waiting for the monopoly.
- Which probe shows the story?
- gini_budget. Both runs start at 0 because the projects begin with the same budget. Performance Only climbs through 0.84 and is still rising. Redistribute 30% levels off near 0.057. The axis is fixed from 0 to 1 for every config, so the small gap stays small instead of being stretched to fill the chart. gini_output tells the same story a little wider, because project A scores 5% more output from the same budget.
- Where does this show up outside the model?
- Anywhere the next round of resources is handed out in proportion to last round's results: research grants, sales territories, ad budgets, streaming recommendations, and compute clusters that schedule more capacity onto the job that just finished fastest. A small early edge becomes a lock on the input. The leverage is the same as in the contrast: cap the reinforcing advantage, or guarantee a baseline share, so last period's win does not decide the whole pool.