JP Bothma Work Services About CV Contact

← Work

Experiment · biology × infrastructure

Slime mould railways

In 2010 a team of Japanese and British scientists put oat flakes on a map where the cities around Tokyo are, set a slime mould down on Tokyo and let it eat. It grew a network of tubes between the flakes that came out a lot like the Tokyo railway, and they wrote down the rules it seems to follow. This is their model, running live on the Netherlands: 40 cities, the real coast and lakes, and the real railway to measure it against.

The experiment runs live with JavaScript and WebGL2: the mould grows on a map of the Netherlands, and its network is scored against the real railway and the minimum spanning tree.

The experiment

Physarum polycephalum is a slime mould: a single cell, bright yellow and big enough to see, that feeds by spreading out. Behind its edge it hollows into a web of tubes, and the protoplasm inside sloshes back and forth every minute or two. Tubes that carry a lot get wider and tubes that carry little close up. Nothing is in charge.

Atsushi Tero and colleagues put 36 oat flakes where the cities around Tokyo are, with bright light over the sea, the lakes and the mountains, which the mould avoids. It reached every flake and thinned into a network close to the railway’s: about the same length (1.75 times the shortest possible tree, against the railway’s 1.8), the same average trip, and only a little more fragile.

Tero et al., Rules for biologically inspired adaptive network design, Science 327 (2010)

The model

The mould becomes a mesh of tubes over the land: here about 18,500 of them, 2.5 km apart, between 6,500 junctions. Each tube has a length L and a conductivity D. One city pushes a flow I₀ into the network and another takes it out. What flows into a junction has to flow out again (Kirchhoff), and the flow through a tube is D times the pressure difference over L (Poiseuille), which settles every pressure.

Then every tube adapts: dD/dt = f(|Q|) − D, where f(Q) = Q^γ / (1 + Q^γ). A tube grows towards how busy it is and shrinks when it isn’t. That is the whole model. The network is whatever is left.

The paper picks a random pair of cities at each moment. Over many moments that comes to all 780 pairs at once, so that is what each step here does: one sparse Cholesky factorisation of the whole country’s pressures, then a solve per city, in a Web Worker. A run takes a few seconds.

How it’s scored

The way the paper scored Tokyo. Cost is the network’s total length. Transport is the average shortest route between two cities, over all 780 pairs. Fault tolerance is the chance it still links every city after one cut at a random point along it. Cost and transport are multiples of the minimum spanning tree’s: the shortest network that links all 40 over land, and so the least you could build. Benefit for cost, α, is fault tolerance over cost.

Every network is drawn onto the same mesh before it’s measured, the railway included, so the mesh’s kinks count the same for all three. The railway is every passenger line in the country, with the branches that don’t lead to one of the 40 cities cut off.

What it finds

With the paper’s settings the mould builds about half as much track as the railway: 1.3 times the shortest tree, where the railway is 2.5. Its average trip is shorter too, 0.77 of the tree’s against the railway’s 0.83. It is a little more fragile: 86% of single cuts leave it in one piece, 91% for the railway.

With the settings that matched Tokyo best, it beats the railway on trips (0.69) and on surviving a cut (93%), with about two-thirds of the track. Push the flow up to 4 and no single cut can isolate a city, with a quarter less track than the railway.

In every run, at every setting I tried, it lays a line north from Lelystad across the Noordoostpolder, past Emmeloord, where no railway runs. That is the corridor of the Lelylijn, the line from Lelystad to Groningen by way of Emmeloord, Heerenveen and Drachten that has been proposed in one form or another for twenty years.

None of this makes the railway badly designed. It serves around 400 stations, not 40 cities, it grew over 180 years around rivers, money and politics, and trains need gentle curves. A mould doesn’t care about any of that, which is rather the point.

The data

Land and water: the national border from PDOK (Kadaster, CC BY 4.0) and the water from AHN height data and OpenStreetMap, which I had already prepared for a toy model of the country. Water narrower than about 2 km stays crossable, the way a bridge would; the sea, the Wadden, the IJsselmeer, the Markermeer and the Zeeland estuaries are not. The islands are left out.

The cities are the twelve provincial capitals and Amsterdam, then the largest places with a station, skipping any within 13 km of a bigger one, 40 in all. The places and the railway come from OpenStreetMap (© OpenStreetMap contributors, ODbL): every passenger line, with double and quadruple tracks merged into one.

© 2026 JP Bothma · Leiden, Netherlands · LinkedIn · Github · How this site is made