Forest Fire Agent Model

(Description at the bottom)

Key:
Fire
Time steps elapsed:
Frames per second:
Number of rows:
Number of columns:
Cell width (pixels):
Cell height (pixels):
Initial number of fire:
Amount of trees to regrow per cell per time step:

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,

  1. each cell regrows trees by a certain amount;
  2. each predator, if it is hungry, looks for fire in the 4 nearest-neighboring cells. If it finds one, it eats it;
  3. each surviving fire, if it is hungry, eats trees from the cell it occupies;
  4. 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;
  5. all agents move randomly to one of their empty, nearest-neighboring cells;
  6. 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;
  7. all agents get older, and if they are too old they die of old age; and finally
  8. 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