Forest Fire Agent Model
(Description at the bottom)
Model Description
Initial State
In a rectangular world, there are cells and two types of agents:
predators and fire. Initially, and each time the model is reset, the
world is created by filling each cell with the maximum amount of trees.
A certain number of predators and fire are randomly placed in the cells
with a certain amount of trees initially in their bellies. At no point
during the simulation can two agents occupy the same cell. The state of
the model is initially drawn on the screen.
During Each Time Step
During each time step of the simulation,
- each cell regrows trees by a certain amount;
- each predator, if it is hungry, looks for fire in the 4
nearest-neighboring cells. If it finds one, it eats it;
- each surviving fire, if it is hungry, eats trees from the cell it
occupies;
- each agent looks for another agent of its
own species in its 4 nearest-neighboring cells, and if it finds one,
both agents have not reproduced yet in this time step,
both are both old enough, there is an open cell next to the agent
that was looking (in one of its 4 nearest-neighboring cells), and
with some percent chance, then they reproduce to create a new agent
with a certain amount of trees in their belly and placed in one of the
empty nearest-neighboring cells next to the agent that was
looking;
- all agents move randomly to one of their empty, nearest-neighboring
cells;
- all agent get hungry and lose a certain amount of the trees in their
bellies, whereby if they have no trees left in their bellies they
die of starvation;
- all agents get older, and if they are too old they die of old age;
and finally
- the current state of the model is drawn on the screen.
Final State
The simulation runs indefinitely, until the stop button is clicked.
© Shodor 2017