Biodiversity spans three nested levels: genetic variation within species, species richness within an ecosystem, and the web of feeding connections across trophic levels (producers → herbivores → carnivores). Losing species thins the web and raises collapse risk.
P(extinction, dt) = extinctRate · dt (per species, per step)
recolonization rate ∝ richness_target − living_species
links ∝ habitat_complexity · living_species
- Species richness — the target number of species the ecosystem tries to sustain across the three trophic rings.
- Genetic variation — spread of visual/trait diversity within each species' population (color scatter per ring).
- Extinction rate — the per-second probability any living species is lost; recolonization slowly refills toward the richness target.
- Habitat complexity — how many feeding links (lines) form between trophic rings; richer habitats support denser food webs.
Real-world application: ecologists track exactly these three levels — genetic, species and ecosystem diversity — because losing diversity at any level reduces an ecosystem's resilience to disturbance and disease.