This model represents an ecosystem of a population of "prey", like rabbits, and "predators", like coyotes. As the number of prey increases then the number of predators will increas because there's more food for them. As the number of predators increase then the number of prey being eaten also increases, which decreases their total population. This puts pressure on the predators because now there's less food for them to eat so their numbers start decreasing, which allows the number of prey to increase. And so the cycle continues.

There needs to be a balance between the predators and prey for the ecosystem to be in balance. If the two species are not in harmony, like too many predators being born, then both species can go extinct.

The sliders represent the relative likelyhoods of births or deaths of the population.

- "bh" is the birthrate of the prey.
- "dh" is the probability of prey being eaten by the predators.
- "bp" is the probability of predators giving birth after eating.
- "dp" is the probability of the a predator dying.
- "n" is the number of generations to display.

If you cause an extinction hit the "page reload" button to start again.

This is a phase diagram of the Lotka-Volterra predator-prey model.
The math behind this is explained in Chapter 2 of this book:
**N. Boccara,
Modeling Complex Systems:
Second Edition, Graduate Texts in Physics, 25 DOI 10.1007/978-1-4419-6562-2 2,
Springer Science+Business Media, LLC 2010
**. A preview of
Chapter 2 is available
from the publisher. Perhaps v2 I'll add a time series plot which helps demonstrate how
the phase-shift in the predator-prey populations.