Forest Fire Simulator
A forest of trees, embers spreading tree to tree, burnt ground slowly regrowing into
fresh fuel. Every tree is in one of three states: unburned, burning, or
burnt — cycling in one direction, unburned → burning → burnt →
back to unburned, forever.
unburned (fuel)
burning, just ignited
burning, nearly burnt out
burnt (regrowing)
scorched (permanent)
firebreak
the rule
An unburned tree has no clock running at all — it just stands there until
something ignites it. Spread chance is a flat chance, every step, that an unburned
tree catches fire from one specific burning neighbor. With k burning neighbors at
once, each is an independent coin flip, so the chance of catching fire from at least one
is:
$$ P(\text{ignites this step}) = 1 - (1 - \text{spread chance})^k $$
Once a tree is burning, its neighbors stop mattering: it just rides out the
burn duration, then forks one of two ways. Normally it becomes burnt ground, rides
out the regrowth time, and becomes unburned fuel again. But scorch chance is
a coin flip, checked once right when the burn duration ends, for skipping that recovery
entirely — heads, the ground is scorched forever instead of regrowing. Only the
unburned state and that one fork are chance-based; every other transition is a pure
duration. Lightning strikes add rare, randomly-placed ignitions on top of neighbor
spread, so a fire can restart even after burning itself out completely.
All durations here are counted in simulation steps, not seconds — the only
real-time knob is sim speed, which just sets how many steps run per second of
wall-clock time.
the brush
Click or drag to paint: Tree resets cells to unburned, Ignite starts a
fire, Burnt paints already-burnt ground, and Firebreak places a permanent
barrier that neither catches nor spreads.
the disease reading
The same rule has a second reading: unburned/burning/burnt is exactly a
Susceptible → Infectious → Removed epidemic model, the classic
compartmental model used for disease spread.