← mino.mobi

traffic

biham–middleton–levine · a self-organizing gridlock · 1992

geometry pack · a cellular automaton on the torus

The simplest model of traffic that has a soul. On a wrap-around grid, red cars head east and blue cars head south; on alternating ticks each colour steps forward one cell — but only if the cell ahead is empty. From a random scatter, the cars organize themselves: below a critical density they line up into diagonal bands and flow freely; above it the whole grid locks solid. Nobody coordinates it. Slide the density across the transition and watch.

density · ρ (fraction of cells with a car)
0.300
grid · L × L
120
speed · cycles / sec
12
music — turn the cars into dancers
beat1.35
sonify — pull an 8-bit track from the traffic
mean velocity vs time
east south. Mean velocity is the fraction of cars that managed to move on their turn — the order parameter. It settles to ≈ 1 (free flow) or ≈ 0 (jam); right at the critical density it can hang in a metastable tangle for a long time before deciding.

The order parameter is mean velocity at steady state. Sweep the density and it stays pinned near 1 (everything flows) until a critical density ρc ≈ 0.3–0.4, where it collapses to 0 (everything jams) — a sharp transition with no smooth in-between. Run the sweep and watch the cliff draw itself.

grid · L × L (smaller = faster)
56
Each point: a fresh random grid at that density, run to steady state, mean velocity of the last cycles. The exact ρc drifts a little with grid size and aspect ratio (and there are delicate intermediate phases near it), but the cliff is unmistakable.

The rule

The Biham–Middleton–Levine model (1992) is a cellular automaton on an L × L torus. Every cell is empty, holds an east-bound (red) car, or a south-bound (blue) car. Time alternates between two moves:

That's the whole law. No car ever changes colour or direction; cars are never created or destroyed. The grid wraps, so a car leaving the right edge reappears on the left. Start from a random placement at density ρ (half red, half blue) and just iterate.

Self-organization and the jam

What makes it famous is that this trivial rule produces a genuine phase transition. Below a critical density the cars spontaneously sort themselves into diagonal stripes — red and blue interleaving so that everyone has clear road ahead — and the system reaches a state where every car moves every turn. Mean velocity → 1. Above the critical density, the cars deadlock into a global jam: red cars blocked by blue, blue blocked by red, in a frozen lattice where nothing can move. Mean velocity → 0.

No one builds the stripes and no one calls the gridlock. Both are just what a torus full of stubborn cars settles into.

The transition is sharp. Jockusch-style smoothness it is not: as you nudge the density up through ρc ≈ 0.3–0.4 (it depends on the grid size and aspect ratio), the steady-state velocity falls off a cliff from 1 to 0. Right at the edge the system is fascinating — it can sit in metastable, partially-jammed “intermediate” phases, neither fully flowing nor fully locked, sometimes for enormous numbers of steps, and on non-square tori it can settle into exotic periodic patterns. The phase diagram tab measures the cliff directly.

Why it belongs in the geometry pack

BML is a tiny discrete dynamical system on a torus — the same surface the loop tiles wind around — and, like the trainability fractal and the Ising thermostats, its headline is an emergent phase transition from a microscopically simple rule. Order parameter, criticality, metastability, self-organization: the whole vocabulary of statistical mechanics, acted out by traffic.

sources