# Predator-Prey Interaction

A predator-prey interaction model is one good way of studying chaos. This model uses iterated equations to simulate the births and deaths of wolves, the predator, and rabbits, their prey. Numerous variables come into play when simulating their interaction. Food availability is one main variable. For example, if the rabbits become overpopulated, the wolves will have a surplus of food. They will, having so much food, flourish and create more wolves. Eventually, the wolves will be overpopulated, kill too many rabbits, and begin the decline in population greatly. Then, the cycle continues again and again.
As the image on this pages shows, this cycle is repeated many times. The model shown above, though, is expanding outward. This means that as the cycles become bigger and bigger, one species will eventually become extinct.
The image above represents the wolf and rabbit population in an X, Y system. Wolves are the Y axis, and rabbits are the X axis. The leftmost side of the image is the Y axis, where X equals zero. Likewise, the bottom is the X axis, where Y equals zero. Once the line being drawn hits either axis, the simulation must be stopped, since a species has just become extinct.
This simulation is fairly easy to create. The two equations needed to represent the wolves and rabbits are easier to understand using long variable name, rather than meaningless A, B, etc. In these equations, the variables represent the following :

 Variable Name Meaning `rabbits` The current rabbit population `wolves` The current wolf population `old_rabbits` The rabbit population in the previous iteration `old_wolves` The wolf population in the previous iteration `rabbit_growth_rate` The rate at which rabbits are reproducing `wolf_growth_rate` The rate at which wolves are reproducing `wolf_death_rate` The rate at which wolves are dying `wolf_kill_rate` The rate at which wolves are killing rabbits

The equations used to create this model are :

rabbits = old_rabbits * (1 + rabbit_growth_rate - wolf_kill_rate * old_wolves)
wolves = old_wolves * (1 + wolf_growth_rate * old_rabbits - wolf_death_rate)

And, to the variables used to produce this image on this page are :

• old_rabbits initially set to 200
• old_wolves initially set to 50
• wolf_death_rate = 0.03
• wolf_growth_rate = 0.0002
• wolf_kill_rate = 0.001
• rabbit_growth_rate = 0.05

These equations, once iterated, will produce the wolf and rabbit populations. It's up to the programmer to decide how this output should be formatted. A bar graph, X-Y system, or other forms of graphs are all good ways to show the population.
The Turbo Pascal program used to make the image on this page may be downloaded. The ZIP file includes source code and a DOS compiled executable. Also, you'll need at least 1 MB of video RAM to run this.