Teaching objectives
What do a rumour, a virus, and a wildfire have in common? How can we model their behaviour? We'll see that graphs and cellular automata create plausible mathematical models for studying and predicting the behaviour of spreading phenomena. And we'll end by making strategic decisions to save a village from fire!
What you'll learn
Students model real-world phenomena — epidemics, wildfires, rumours — using graphs, grids, and simulation, building intuition for why small changes in connectivity and density can have enormous consequences.
- Students predict before simulating and compare their intuition with the results: first with exponential growth (3 × 2¹⁰), then with graphs where nodes are repeated.
- They explore Erdős-Rényi networks and discover that the starting node matters: beginning at a hub sends contagion soaring compared to starting at an isolated node.
- They compare three topologies (random, small-world, scale-free) and learn that the structure of the network determines the speed of spreading.
- They practise vaccinating the bridges between communities: with just 7 vaccines, who should be immunised to stop the epidemic?
- They discover percolation on square, hexagonal, and triangular grids: there is a critical density threshold (≈ 0.59 on a square grid) below which the fire stops spreading across the grid.
- They investigate the effect of wind on grid propagation, and in the final room, across three scenarios with 400, 500 and 500 coins and at most 60 turns, manage the budget to place firebreaks, firefighters, and helicopters before the fire reaches the village.
Key mathematical ideas
- Unconstrained spreading follows exponential growth, though the graph structure matters.
- A contact network is a graph: people = nodes, contacts = edges; the graph's structure governs the speed of contagion.
- Hubs (high-degree nodes) act as amplifiers. When the network is made of communities, vaccinating the bridge nodes that join them isolates each group and stops the contagion.
- Percolation studies the connectivity of a random system; there is a critical threshold p_c (which varies by geometry: ≈ 0.59 with square cells, ≈ 0.50 with hexagonal cells, ≈ 0.70 with triangular cells) where global connectivity appears or disappears abruptly.
- The number of neighbours of each cell determines the threshold: more neighbours → lower threshold → fire spreads with fewer trees.
Room-by-room contents
Room 1 · The secret that leaks out
Animated introductory room presenting the core idea of the lab: some things spread (a rumour, a song, a virus, a fire) and sometimes they stay in one corner, sometimes they take over everything.
Student tasks
- Read the introduction and click the button to start the adventure.
Room 2 · Predict the size
Pure exponential growth scenario: 3 people know a secret and each tells 2 new people every day for 10 days. The student predicts how many people will know at the end (answer: 3 × 2¹⁰ = 3 072) before finding out why that model is too optimistic.
Student tasks
- Choose the numerical range that estimates how many people know after 10 days.
- Reflect on whether the assumption that "no one is told twice" is realistic.
Room 3 · Your first graph
Random 30-node graph (Erdős-Rényi) with one initially infected node (yellow halo). A slider controls the contagion probability p at each step, and the student observes how the resulting epidemic varies.
Student tasks
- Move the probability slider p and run several simulations.
- Identify the range of p in which the contagion spreads to almost all nodes.
Room 4 · Does the first node matter?
The same Erdős-Rényi graph, but now the contagion can start from the "popular" node (many connections), the "intermediate" one, or the "loner". The student first predicts which starting node spreads the contagion furthest, then verifies experimentally.
Student tasks
- Predict which starting node spreads the most.
- Run the three experiments and compare the results with the prediction.
Room 5 · Three different worlds
Three panels show three different network topologies (random, small-world, and scale-free). Before simulating, the student assigns labels based on which network they think will spread fastest; then the contagion is launched in all three at once and reveals the answer: the scale-free network is usually the fastest, because the hub crosses it in a few steps.
Student tasks
- Assign a predictive label (fastest / medium / slowest) to each panel.
- Run the simulations and verify the prediction.
Room 6 · How does a network grow?
A network grows from a core of 5 nodes: every second a new node arrives and connects to 2 existing ones according to the active rule (preferential: the popular attract more; anti-preferential: loners attract more; or random), and a slider p sets the intensity of the rule. Next to the graph, a histogram shows the degree distribution and a counter shows the degree of the largest hub. When the network reaches 22 nodes a question appears: which rule explains why on Instagram a few people have millions of followers while most have only dozens (preferential attachment, which produces a scale-free network; Barabási and Albert).
Student tasks
- Grow the network with each rule and with different values of p.
- Compare the degree histograms and the size of the largest hub.
- Answer which rule produces a few giant hubs and many nodes with few connections.
Room 7 · The vaccine trick
The student is given 7 vaccines for a network of 100 people made up of 7 dense communities joined in a ring by bridge nodes, and must decide whom to immunise before an epidemic starts from a random node. The effective strategy is to vaccinate the bridges between communities: each group is then isolated and the contagion cannot jump from one to another.
Student tasks
- Click the 7 nodes to immunise.
- Launch the epidemic and evaluate whether the contagion spiralled out of control or was contained.
Room 8 · Rumour vs. Disease
Two panels with the same 28-node network, which can be random (Erdős-Rényi), small-world, or scale-free. On the left a rumour spreads: each node decides only once, with probability p, whether to tell it, and then it reaches all its neighbours or none. On the right, an SIR disease: a node stays infectious for T cycles and each neighbour gets its own independent trial with probability p. Two questions: with T = 1, which one usually reaches more nodes (the disease), and what happens when T is raised (it reaches further, because the probability of escaping drops from 1 − p to (1 − p)ᵀ).
Student tasks
- Choose the topology and set p and T.
- With T = 1, run it several times and compare how many nodes each panel reaches.
- Raise T to 2 or more and check how the reach of the disease changes.
Room 9 · The magic jump
A square grid representing a random forest: green = tree, grey = gap. The student reduces tree density and looks for the threshold below which fire stops crossing from one side to the other (percolation, p_c ≈ 0.59).
Student tasks
- Try several tree densities.
- Find the percentage below which fire can no longer cross the forest.
Room 10 · The number 59
Automatic sweep of densities with many simulations per value: a curve of crossing probability versus density is plotted. The sharp transition around 59 % (p_c ≈ 0.59) becomes visible in the graph.
Student tasks
- Launch the sweep and observe the resulting curve.
- Read from the graph the density value at which the transition occurs.
Room 11 · Hexagonal cells
The forest switches from a square grid to a hexagonal mesh (each cell has 6 neighbours). The student searches for the percolation threshold again and checks whether it differs from the square grid (it is now around 50 %).
Student tasks
- Explore different densities on the hexagonal mesh.
- Estimate the new percolation threshold and compare it with the previous 59 %.
Room 12 · Triangular cells
Now the grid is triangular: each cell shares a side with only 3 neighbours. With fewer connections, the percolation threshold rises (to around 70 %). The student predicts the direction of change and verifies it experimentally. Once the threshold is declared, a table summarises the three grids: 3, 4 and 6 neighbours per cell, with thresholds of ≈ 70 %, 59 % and 50 %.
Student tasks
- Predict whether the threshold will rise, fall, or stay the same compared to the hexagonal mesh.
- Find the threshold on the triangular grid and compare with the prediction.
Room 13 · The wind takes charge
A forest of hexagonal cells with fixed density, two ignition points on the left and a firebreak along the central column; the wind always blows east. Three sliders control wind speed (0–100 km/h), temperature (5–45 °C) and dryness. Each run adds a curve of cells on fire per turn to the chart, and an exponential can be overlaid for comparison. The student declares the wind speed from which embers jump the firebreak and ignite the other side (≈ 40 km/h).
Student tasks
- Run several trials with different wind speeds, temperatures and dryness levels.
- Compare the curves of cells on fire per turn for each run.
- Declare the wind speed from which the fire crosses the firebreak.
Room 14 · Save the village
Real-time strategy game: a fire starts in the north-west and the wind blows from north-west to south-east, towards the village. There are three scenarios (moderate wind on a normal day, strong wind, and moderate wind during a heat wave), with 400, 500 and 500 coins and a maximum of 60 turns. The student places firebreaks (20 coins), firefighters (30), the helicopter (100, over a 5 × 5 area) or, as a last resort and only once, artificial rain (250) so that no house burns.
Student tasks
- Distribute the budget among the four available tools.
- Simulate the fire and adjust the strategy until the whole village is protected in each scenario.
Rooms to project
The most striking ones to show and discuss in class.