What happens to genetic diversity after a mass die-off?

Run the experiment on this page ↓

Short answer (general ecology)

When a population is cut to a few individuals, some genetic variants are lost simply by chance, and rare variants are lost most easily. Numbers can recover within generations, but a lost variant does not come back unless mutation or migration brings it in again. This is called a population bottleneck.

What you can do here

Compare two populations that carry 8 variants of a marker with no effect on survival or reproduction. In one world, all but 8 individuals are removed at random at a set time. Follow how many variants remain, and repeat the run to see that different variants survive each time.

Limit

This is an abstract educational model. It does not forecast what would happen in any real ecosystem.

Run the experiment

  1. Predict
  2. Watch one run
  3. Compare 5 runs
  4. Read the result

At the end of the run, how many marker variants do you think B will have compared with A?

You can start without choosing. Your choice is not sent anywhere.

Watch one run

tick 0 / 0Preparing the world…

A: nothing changed

B: all but 8 removed at random

A and B right now
AB
Herbivores
Grass
Marker variants
Speed
Zoom

Keyboard, while the focus is in this panel: Space plays and pauses, → advances one step, R restarts, 1 and 2 show A and B.

Selected individual

Click or tap an individual in either world to see its values here. The button under each world selects one without a pointer.

What the shapes and colours mean

Body colour and pattern = neutral marker (8 variants)

A marker has no effect on survival or reproduction. It is passed unchanged from parent to offspring. To make the variants easy to tell apart, each pattern also has its own body colour (the same colour as its band in the charts).

Plain
Cross bands
Long stripes
Spots
Ring
Half
Grid
Star

Ground colour = amount of grass

The amount of grass is shown in three steps: the colour of soil where there is almost none, light green where there is grass, and deeper green where it is thick.

Soil (almost none)
Grass
Thick grass

Dullness and thinness = reserves

As reserves run low, the body turns duller and thinner. An individual whose reserves run out dies.

Plenty
Low
Almost none

Size = growth

Newborn individuals are drawn small and grow to adult size.

Newborn
Young
Adult

Compare repeated runs

One run can differ from the next by chance. The same comparison is repeated with different random seeds to see how consistent the difference is.

Try it: change a condition and compare again

Write down what you expect first. The random seeds stay the same, so a difference from the standard result comes from the setting you changed.

Ideas:

How many are left, chosen at random, at the mass die-off. Standard: 8. Range: 2 to 400.

Saved results

Results are stored only inside this browser and are never sent to a server. What is stored is the settings, the random seeds and the summary numbers for each replicate; the tick-by-tick record is not stored, because the same settings always reproduce the same result. Up to 50 results are kept across all experiments and the free lab, and the oldest are removed beyond that. They do not carry over to another browser or device: use a share link to move one. Deleting cannot be undone.

Move saved items to another browser

Everything saved here (all experiments and the free lab) can be written to one file. Load that file in another browser or device and the same items are listed there. Loaded results use the numbers in the file as they are; run the settings again if you want to check them. The file stays on your device and is not sent anywhere.

Reference result (20 replicates)

These values were computed in advance with the same engine that runs in your browser. Running the same settings and seeds yourself gives exactly the same numbers.

A and B compared

MeasureResult
Marker variants remaining (just after the intervention)B was lower in all 20 replicates (median A 8, B 5).
Marker variants remaining (at the end)B was lower in 19 of 20 replicates (median A 8, B 5). The remaining 1 went the other way or were equal.
Gene diversity H (at the end)B was lower in 17 of 20 replicates (median A 0.80, B 0.72). The remaining 3 went the other way or were equal.
Herbivore count (mean over the observation window)The replicates disagreed (B higher in 10, lower in 10, equal in 0; median A 590, B 591). With these settings and this many replicates, no clear difference can be claimed.

Observed What was measured in these runs.Reading How the measurements can be read, given the rules of this model.

Engine version 0.1.0, 20 replicate(s) with seed(s) 101–120. Observation window: ticks 1,400–2,400. These are observations from this model with these settings, not predictions about real ecosystems.

Charts

Marker variants remaining
Marker variants remainingB was lower in 19 of 20 replicates (median A 8, B 5). The remaining 1 went the other way or were equal.0246805001,0001,5002,000Time (ticks)InterventionABObservation window
Show as a table
TickA medianA rangeB medianB range
088–888–8
30088–888–8
34888–853–7
39688–853–7
50488–853–7
60088–853–7
90088–853–7
1,20088–853–7
1,50088–853–7
1,80087–853–7
2,10086–853–7
2,40086–853–7
Gene diversity H
Gene diversity HB was lower in 17 of 20 replicates (median A 0.80, B 0.72). The remaining 3 went the other way or were equal.0.000.250.500.751.0005001,0001,5002,000Time (ticks)InterventionABObservation window
Show as a table
TickA medianA rangeB medianB range
00.850.85–0.850.850.85–0.85
3000.840.84–0.840.840.84–0.84
3480.840.84–0.850.770.60–0.85
3960.840.84–0.850.770.61–0.86
5040.840.83–0.850.760.61–0.85
6000.840.82–0.850.760.59–0.85
9000.840.79–0.850.750.57–0.85
1,2000.830.75–0.860.750.57–0.84
1,5000.820.75–0.860.730.57–0.83
1,8000.810.75–0.850.720.57–0.82
2,1000.810.75–0.850.720.56–0.82
2,4000.800.75–0.840.720.58–0.82
Herbivore count
Herbivore countThe replicates disagreed (B higher in 10, lower in 10, equal in 0; median A 590, B 591). With these settings and this many replicates, no clear difference can be claimed.05001,0001,50005001,0001,5002,000Time (ticks)InterventionABObservation window
Show as a table
TickA medianA rangeB medianB range
0269269–269269269–269
300534534–534534534–534
348616593–6341411–17
396654606–6952822–33
504586511–642127103–141
600574508–618480404–528
900592546–626599537–632
1,200590523–635590544–634
1,500594562–619587552–645
1,800604559–687597537–636
2,100593542–660571538–636
2,400600518–642584511–680

Share of each pattern, replicate by replicate

Each band is one pattern, and its height is the share of herbivores that carry it. The dotted line marks the intervention. Compare which patterns are left in each replicate. The first 5 of the 20 replicates are shown.