What is going on
There is grass growing (green), herbivores eating the grass (blue), and carnivores eating the predators (red). Each has
a density between 0 and 1, which controls the intensity of the corresponding color. There is also soil fertility, which
goes up when there is lots of grass around and goes down when there is not. Plants, herbivores and carnivores will
diffuse into adjacent regions. Note that is possible for a species to die out. More plants, herbivores and carnivores may be
placed by act of god (you) using the tools above. You can also smite the ungodly if you wish with rocks from heaven.
The actual equations used depend upon the constants listed under world dynamics.
f is the soil fertility (at one place) (0-1)
g is the vegetation [grass] density (0-1)
b is the herbivore [bison] density (0-1)
r is the carnivore [rabbits, man eating variety] density (0-1)
F is the mean soil fertility in the four orthogonally adjacent pixels to the current place.
Similarly for G , B and R
d f , d g ,
d b , d r are diffusion rates.
Currently d f = 0
The world then evolves according to a discretized version of the following equations, which each variable clamped to the range 0-1:
e g = g b c b (rate at which herbivores eat vegetation)
e b = b r c r (rate at which carnivores eat herbivores)
d dt g =
d g G - g
+ g 1 - g c g f
- e g
d dt b =
d b B - b
+ e g
- e b
- m b
d dt r =
d r R - r
+ e b
- m r
d dt f =
d f F - f
+ c f b - f