Forest Fire

A forest fire model that can burn trees. Firefighters can put out fires and botanists can heal a charred tree into a normal tree



Agents

Number of agents: 4

Behaviors


BotanistBotanist

Number of methods: 2


WHILE-RUNNING ()

Botanist is moving with WASD

Number of rules: 4 

If
SEE ((0 0) , botanist), and
KEY (13)
Then
MOVE ((-1 0)), and
MAKE ((0 0) , Healing)

If
SEE ((0 0) , botanist), and
KEY (0)
Then
MOVE ((0 -1)), and
MAKE ((0 0) , Healing)

If
SEE ((0 0) , botanist), and
KEY (1)
Then
MOVE ((1 0)), and
MAKE ((0 0) , Healing)

If
SEE ((0 0) , botanist), and
KEY (2)
Then
MOVE ((0 1)), and
MAKE ((0 0) , Healing)

ON (Healing)

Botanist can change it into a normal tree from a charred tree, WIP

Number of rules: 4 

If
SEE ((0 0) , botanist), and
SEE ((1 0) , charred)
Then
CHANGE ((0 0) , tree)

If
SEE ((0 0) , botanist), and
SEE ((-1 0) , charred)
Then
CHANGE ((0 0) , tree)

If
SEE ((0 0) , botanist), and
SEE ((0 1) , charred)
Then
CHANGE ((0 0) , tree)

If
SEE ((0 0) , botanist), and
SEE ((0 -1) , charred)
Then
CHANGE ((0 0) , tree)



ConductorConductor

Number of methods: 1


WHILE-RUNNING ()

The conductor keeps track of synchronized time

Number of rules: 1 

If
SEE ((0 0) , conductor)
Then
BROADCAST (Tree , Check), and
BROADCAST (Tree , Change)



FirefighterFirefighter

Number of methods: 2


WHILE-RUNNING ()

Move firefighter with arrow keys

Number of rules: 4 

If
SEE ((0 0) , firefighter), and
KEY (124)
Then
MOVE ((0 1)), and
MAKE ((0 0) , Firefighting)

If
SEE ((0 0) , firefighter), and
KEY (125)
Then
MOVE ((1 0)), and
MAKE ((0 0) , Firefighting)

If
SEE ((0 0) , firefighter), and
KEY (123)
Then
MOVE ((0 -1)), and
MAKE ((0 0) , Firefighting)

If
SEE ((0 0) , firefighter), and
KEY (126)
Then
MOVE ((-1 0)), and
MAKE ((0 0) , Firefighting)

ON (Firefighting)

Change firefighter into a normal tree

Number of rules: 4 

If
SEE ((0 0) , firefighter), and
SEE ((1 0) , burning)
Then
CHANGE ((0 0) , tree)

If
SEE ((0 0) , firefighter), and
SEE ((0 1) , burning)
Then
CHANGE ((0 0) , tree)

If
SEE ((0 0) , firefighter), and
SEE ((-1 0) , burning)
Then
CHANGE ((0 0) , tree)

If
SEE ((0 0) , firefighter), and
SEE ((0 -1) , burning)
Then
CHANGE ((0 0) , tree)



TreeTree

Number of methods: 2


ON (Check)

Change a normal tree to a burning tree to a charred tree

Number of rules: 2 

If
SEE ((0 0) , tree), and
NEXT-TO (> , 0 , burning)
Then
SET (Spark , to , 1)

If
SEE ((0 0) , burning)
Then
SET (Burnout , to , 1)

ON (Change)

Percent change to change a tree to burning and sets the spark and burnout values

Number of rules: 2 

If
SEE ((0 0) , tree), and
IS (Spark , = , 1), and
%-CHANCE (3)
Then
CHANGE ((0 0) , burning)

If
SEE ((0 0) , burning), and
IS (Burnout , = , 1)
Then
CHANGE ((0 0) , charred)


This report was generated using AgentSheets Version 3.0.0