Simulating the evolution of aggression using Python.
Simulation of N agents for a survival resource.
Iterate over X number of generations:
- Each agent goes to a random location.
- The
food
is shared according to the agent strategy. - The agent survives, dies or reproduces depending on the food quantity consumed in each interation.
The Simulation
includes two strategies:
-
Dove
strategy - Passive -
Hawk
strategy - Aggressive -
Dove
shares the food if against aDove
. -
Hawk
steals both pieces of food if against aDove
. -
No agent gets any food if both the agents are
Hawks
In each iteration of Simulation
:
- Each location has two pieces of
food
. - Consumption of a single piece of
food
leads to surival of the agent. - Consumption of a two pieces of
food
leads to reproduction of the agent. - No consumption of
food
leads to the death of the agent.
This simulation is based on Simulating the Evolution of Aggression by Primer