Model Description
This project models a forest fire. Two versions of the project were created; the first uses AgentCubes, and the second uses JavaScript and the AgentModel.js library.
The Story
A model of a forest fire. The burning trees are represented by orange tiles, and the healthy trees are represented by the dark green tiles. Burning trees will set any healthy trees next to them on fire. After 200 cycles, the fire burns out, and the trees turn into black burnt trees. Firemen, represented by the blue tiles, have a 20% to die when next to a burning tree. If they survive, there is a 70% chance to put out the fire, turning them into brown saved trees. Afterwards, they move.
Agents and Shapes
Agent | Shape | Color |
---|---|---|
Trees | Healthy | Green |
Burning | Orange | |
Burnt | Black | |
Saved | Brown | |
World | Yellow | |
Firefighter | Blue | |
Counter | Magenta |
Observed Behaviors
Overall, behavior that is portrayed is that the burning trees overpower the healthy trees and the external help, which is the firefighters and cause the entire forest to become burnt. The reason why such a scenario takes place is because the burning trees spread so fast that the firefighters are not able to cut it out nor can they sustain the healthy trees, hence they dominate and cause the forest to burn.
Nearest-Neighbors Burning
There is an issue with AgentCubes logic in which burning spreads counter-intuitively. Rather than burning the nearest 4 tiles, it can burn an incredibly large amount of the world at once. This is caused by AgentCubes checking each and every burning tile immediately one after another “while running”. This means that if one tile sets another on fire, the newly burning tile will be checked to set others on fire immediately afterwards. To fix this issue, we would have to make sure that this wouldn’t happen. Each new action - a check to see if the firemen were still alive and to see if the burning trees were next to healthy ones, spread for the actions to occur, and then for the firemen to move. By separating these, the new tiles would not immediately burn other tiles and the problem was solved.
Conclusions
Forest fires are actually natural to nature and should occur once in a while, to reincorporate the valuable nutrients and vegetation. In a modeling perspective, we learned that it is really hard to plan without implementing, and how there are several factors that need to be considered when modeling a very realistic scenario. In a programming standpoint, we learned that if we did not keep track of our variables and the functions and commands that we used we could easily get confused and not be able to obtain the right result or even get a result. Programming can be intriguing and frustrating at the same time.