Forest Agent Model

Forest Fire Agent Model

(Description at the bottom)

Key:
Burning
Healthy
Time steps elapsed:
Frames per second:
Number of rows:
Number of columns:
Cell width (pixels):
Cell height (pixels):
Initial number of burning people:
Initial number of healthy: people

Model Description

Initial State

In a rectangular world, there are cells and two types of agents: burning people and healthy people. Initially, and each time the model is reset, the world is created. A certain number of Burning and healthy people are randomly placed in the cells. 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 Burning person looks for healthy people in the 4 nearest-neighboring cells. If it finds one, it infects it;
  2. 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 food in their belly and placed in one of the empty nearest-neighboring cells next to the agent that was looking;
  3. all agents move randomly to one of their empty, nearest-neighboring cells;
  4. 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