This model demonstrates Stuart Kauffman's "buttons and threads" thought experiment, one of the simplest illustrations of a phase transition in a random network.
Imagine N buttons scattered on a floor. You pick two at random and tie a thread between them. Repeat. At first, you get isolated pairs and small clusters. Then, around the moment when the number of threads reaches half the number of buttons, something dramatic happens: a single giant cluster emerges and rapidly absorbs most of the network.
This is the same mathematics behind Erdos-Renyi random graphs. The transition at threads/N = 0.5 is sharp, sudden, and universal. It does not depend on which buttons you pick. It depends only on the ratio.
N buttons are arranged in a circle. At each step, two buttons are chosen uniformly at random and connected by a thread. A union-find data structure tracks which buttons belong to the same connected component.
The largest connected component is colored green. All other components are colored red. The chart below the network plots the fraction of buttons in the largest component as threads accumulate.
Space = play/pause, → = step, R = reset.threads/N = 0.5 (the dashed orange line), the curve kicks upward sharply. This is the phase transition.threads/N = 0.5 and look at the network. You can often see the moment where two large clusters are about to merge.Kauffman used buttons and threads to argue that the origin of life may not require an astronomically unlikely event. Instead, once molecular diversity crosses a threshold, a connected web of mutual catalysis becomes virtually inevitable. Order, in this view, is free.
The same phase transition appears in epidemiology (disease outbreaks), social networks (information cascades), ecology (food web stability), and percolation physics (fluid flow through porous rock). The math is identical. Only the substrate changes.
Erdos-Renyi random graphs. Percolation on lattices. Kauffman's NK fitness landscapes and autocatalytic sets. Barabasi-Albert preferential attachment networks (a different growth rule that produces scale-free rather than random topology).
Stuart Kauffman's random graph phase transition
Space = play/pause · → = step · R = reset