The Forest Fire Model, Explained
After reading this you will know how three simple cell rules produce fires with no typical size, how to reproduce that behavior from the demo settings, and how to read a power law when you see one.
What the model is
The forest-fire model is a cellular automaton on a grid. Every cell holds one of three states: empty, tree, or burning. Time advances in discrete steps, and at each step three rules act on every cell at once.
Picture a 128 by 128 grid, so 16384 cells. Trees sprout in empty cells at random. The forest thickens. Then lightning hits one tree. That tree burns, its burning spreads to touching trees, and the fire eats through the whole connected patch before dying out. A gap opens. Trees regrow. Lightning strikes again. Sometimes the strike clears three cells. Sometimes it clears nine thousand.
The striking fact is that there is no single answer to "how big is a fire." Run the model long enough and you get a fire of nearly every size, following a power law. That pattern, arising with no external tuning, is called self-organised criticality. The forest drives itself to the edge where fires can spread but usually do not.
The three rules, precisely
Let each cell have a state at step t. The update to step t+1 uses two parameters: a growth probability p and a lightning probability f. The rules are:
- A burning cell becomes empty. Fire lasts one step, then leaves ash (treated as empty).
- A tree becomes burning if any of its four neighbours is burning. If no neighbour burns, the tree becomes burning anyway with probability f, the lightning strike. Otherwise it stays a tree.
- An empty cell becomes a tree with probability p. Otherwise it stays empty.
Neighbour here means the four cells sharing an edge (the von Neumann neighbourhood). Because fire spreads only through touching trees, a single strike burns exactly one connected cluster of trees. That is the same connectivity idea as percolation, playing out over time rather than in one frozen snapshot.
Two versions of the model exist. The synchronous version updates every cell at once per step, so a fire crawls outward one ring of neighbours per step. The instantaneous version burns the entire connected cluster within a single step. The demo uses the instantaneous style, which makes fire sizes easier to measure. The statistics look the same either way.
When to reach for it, and when not
Use the model as the cleanest example of self-organised criticality you can watch. It shows how a slow driving force (tree growth) and a fast relaxation (fire) settle into a critical state with no fine tuning. It is a good companion to sandpile models and to the study of earthquakes and avalanches, which share the same size statistics.
Do not use it as a predictive model of real wildfires. Real forests have wind, terrain, fuel moisture, firebreaks, and human suppression. The grid has none of that. The model captures one idea well: that clearing events on a slowly reloading landscape produce scale-free event sizes. It does not tell you when California will burn.
The separation of timescales matters. The clean power law appears only when growth is slow compared to fire and lightning is rare compared to growth. Concretely you want f \ll p \ll 1. If lightning is as common as growth, fires strike before the forest recovers and you see only small blazes.
Reading the power law
The key output is the distribution of fire sizes. Let s be the number of trees burned in one strike. Over many strikes, the fraction of fires of size s follows a power law:
Here N(s) is how often a fire of size s occurs, and \tau (tau) is the exponent, typically near 2 for this model in two dimensions. The symbol \propto means "proportional to": doubling s multiplies the frequency by 2^{-\tau}, roughly one quarter when \tau = 2.
A power law has no typical size. Contrast that with a normal distribution, which clusters around a mean. If fires were normal with mean 40, you would almost never see a fire of 4000. Under a power law of exponent 2, a fire 100 times larger is about 100^{-2} = 0.0001 times as frequent, rare but not impossible. That is why grid-spanning infernos happen.
The clean test is a log-log plot. Take the logarithm of both sides:
C is a constant setting the height. On axes where both s and N(s) are logarithmic, a power law is a straight line with slope -\tau. A curve that bends is not a clean power law.
A worked example with the demo settings
The demo starts from the field defaults: a growth rate that plants trees slowly, a lightning rate far smaller, and instantaneous burning. The exact numbers below are chosen to satisfy f \ll p \ll 1 and to be easy to check by hand.
Tracking one patch of forest
Take a 128 by 128 grid (16384 cells), growth p = 0.01, lightning f = 0.000006.
- Start empty. Each empty cell grows a tree with probability 0.01 per step, so on average 0.01 \times 16384 \approx 164 new trees per step at first.
- Density climbs. After about 100 steps a large fraction of cells hold trees, and the forest approaches the percolation threshold where a single connected cluster can span the grid. On a square grid that threshold is a tree density near
0.5927. - Expected lightning strikes per step equal f times the number of trees. At density 0.59 that is 0.000006 \times 0.59 \times 16384 \approx 0.058 strikes per step, so a strike lands roughly every 17 steps.
- When a strike hits a tree, the burned size equals the size of that tree's connected cluster. Near the percolation threshold, cluster sizes themselves follow a power law, so the fire size does too.
- A large fire clears a big cluster and drops the local density. Growth refills the gap over the next few hundred steps, and the cycle repeats. The long-run average density stays pinned near the critical value.
The ratio that governs the largest fires is p/f. Here p/f \approx 1667. Roughly speaking a strike burns a cluster that took about that many growth events to assemble, which is why the biggest fires approach the size of the whole grid.
Common mistakes when reading the output
The first mistake is confusing a power law with an exponential. Both fall off, but an exponential drops far faster in the tail. Plot on log-log axes, not log-linear. A power law is straight on log-log; an exponential is straight on log-linear. Getting the axes wrong makes you report the wrong physics.
The second mistake is trusting the far tail. The largest fire cannot exceed the grid size, so the distribution has a cutoff. On a 16384-cell grid the line bends down past a few thousand trees. That bend is a finite-size artifact, not a law. Fit the straight middle, not the noisy tail.
Do not estimate the exponent by binning fire sizes into equal-width bins and fitting the log counts. Equal-width bins undersample large fires and bias the slope. Use logarithmic bins (widths growing by factors of 2) or fit the cumulative distribution instead, which needs no binning at all.
How it relates to other models here
Fire spreading through connected trees is contagion on a lattice, so the forest-fire model is a cousin of the SIR Epidemic Simulator, where infection spreads and burns out. Both have a threshold below which outbreaks stay small. The slow-drive, fast-relax rhythm of growth and fire echoes the boom and bust of the Predator–Prey Simulator. If lattice models of collective behavior interest you, the same grid mechanics drive Schelling’s Segregation Model, the emergent wealth spread in Sugarscape, and the phantom jams in the Traffic Jam Simulator.
Frequently asked questions
What is self-organised criticality?
It is when a system tunes itself to a critical point with no external adjustment. The forest does not need you to set the density to 0.5927. Growth pushes density up, fire knocks it down, and the balance sits at the critical value on its own. At that point event sizes have no typical scale.
Why is the exponent near 2?
The fire size equals the size of the connected tree cluster a strike hits. At the percolation threshold, cluster sizes in two dimensions follow a power law, and weighting by the chance of hitting a cluster gives an exponent close to 2 for the forest-fire variant used here. The exact value depends on the variant and on how you define fire size.
Does grid size change the statistics?
The slope of the straight part does not change with grid size, but the cutoff does. A 256 by 256 grid (65536 cells) supports fires four times larger than a 128 by 128 grid, so its straight line runs further before bending. Bigger grids give cleaner exponent estimates.
What happens if lightning is too frequent?
If f is close to p, strikes hit before clusters can grow, so every fire is small and the power law collapses to a short, steep segment. You need f \ll p to see fires spanning many orders of magnitude. Try lowering f in the widget and watch the line lengthen.
Is this a good wildfire predictor?
No. It reproduces the scale-free size statistics of clearing events, which is one real and interesting feature, but it ignores wind, terrain, fuel type, and suppression. Treat it as a lesson in how simple rules produce power laws, not as a fire forecast.