Projects / University / 2025

Forest fire spread simulation

A Python model of how a wildfire spreads, with wind and firebreaks.

treeburningempty or burnt
A run of the same rules, drawn in your browser. The fire started near the top with the wind blowing down, and the bare strip is a firebreak.

A project for a modelling and simulation course. The forest is a 50 by 50 grid of trees and empty ground. Each step, a tree next to a fire has a chance of catching, burning trees burn out, and wind makes the fire more likely to spread in one direction.

You can start a fire by clicking a tree, switch wind and a firebreak on and off, and run a forecast that simulates 50 possible futures to show where the fire is most likely to reach.

What I'd improve

Turn the forecast into a proper probability map, add a fixed random seed so runs can be repeated, and speed it up for larger forests.

Code on GitHub ↗