Predator/Prey Simulation for Investigating Emergent
Behavior
Jay Shaffstall
Introduction
Overview of emergent behavior
Evolution & emergent behavior
Predator/Prey simulation
Outcomes
Emergent Behavior
An emergent behavior is a behavior that is not programmed into the system.
An emergent behavior evolves over time from more primitive behaviors.
The classic example: ant colony
Emergent Behavior
The ant colony looks like it is strongly organized…each ant does a job to keep the colony healthy.
In reality, each ant is responding to local rules. Each ant decides what to do next based on what is in its immediate area.
An ant has no concept of the colony.
Emergent Behavior
So emergent behavior is behavior that arises from the interaction of a lot of local behaviors.
Another example is how cities seemingly organize into neighborhoods, even though each individual is making decisions based on what is best for them.
Evolution & Emergent Behavior
Evolution allows a population to adapt to its environment over time. Environmental pressureCharacteristicsNatural selectionEvolution is the process of a species adapting to environmental changesDoes nothing for the individual
Evolution & Emergent Behavior
Over time, individuals may start to cooperate in local ways.
This local cooperation leads to emergent behavior, in which widely separated individuals appear to be working toward the same purpose
Predator/Prey Simulation
A predator/prey simulation provides a simple environment in which evolution can happenThere are three types of organisms in the simulationPlantsPreyPredators
Predator/Prey Simulation
Each organism has its own genetic structure.
One gene for the prey, for example, might control how far the prey can move in one action
Each organism also has rules for how it interacts with its local environment
Predator/Prey Simulation
Each organism can breed to produce more organisms. The organisms that live long enough to breed are considered to be “fit”, and pass on their genetic characteristics to their children.Over time, the children become more and more “fit”
Predator/Prey Simulation
Stages of developmentEnvironment
Invasive plants
Crippled prey
Nice predators
No more lemmings
A complete simulation
Predator/Prey Simulation
Goals of the simulation:Provide an environment in which evolution could take place for predators and prey
See what emergent behaviors come out of the local behaviors
Outcomes
The first non-testing run of the simulation took about 15 hours, and generated around 10 gigabytes of data.
Let’s look at a sample of the displays. This sample is from the 8th step of the simulation.
Outcomes
That was from the 8th step, where we still have the initial random distribution of animals and plants.
Let’s look at a display from the 5600th step, about 15 hours later.
Outcomes
But what happened between those steps? Did evolution take place?
Let’s look at a population graph for that run.
Predator/Prey Populations
020000400006000080000
100000120000
146
592
913
9318
5723
2127
8532
4937
1341
7746
4151
0555
69
Cycle
Popu
lation
Plants
Prey
Predators
Outcomes
Clearly, evolution did not take place.So, when the program doesn’t work like you expected, you find out why.The big question is why didn’t the prey population increase when the plant population increased?Consider this zoomed in part of the 5600th step.
Outcomes
The failure of prey to reproduce is the key problem with the simulation as it is written.
Because of that, we do not see evolution
Without evolution, we don’t see emergent behavior
Conclusion
I set out to write a simulation to investigate emergent behavior
Much bigger project than I thought, but also a lot of fun
I recommend future students to look at projects dealing with emergent behavior
Conclusion
To learn from my mistakes:
Capstone paper available at
http://cs.franklin.edu/~shaffsta/paper.zip