This simulation generates random-walk step lengths from a symmetric α-stable (Lévy) distribution using the Mantegna algorithm, so each walker's jump size follows a power-law tail P(l) ∝ l−(1+α) instead of the thin-tailed Gaussian steps of ordinary Brownian motion. Dragging the stability exponent α from 2.0 down toward 1.05 shifts the walk from smooth, uniformly-sized diffusion to true Lévy flight behaviour: long stretches of small steps punctuated by rare, enormous jumps. A live log-log histogram of step lengths shows the power-law tail forming in real time, alongside a red reference line at the theoretical slope −(1+α).
Up to 8 independent walkers move in 2D, each step's length drawn via the Mantegna algorithm (a ratio of two Gaussian variables raised to the 1/α power) and each step's direction chosen uniformly at random. The flight-path canvas plots each walker's trajectory; the distribution canvas bins every recorded step length on a log-log scale, so a straight-line tail confirms the power-law behaviour predicted for α < 2.
Drag the Stability exponent α slider (1.05–2.0) to move between heavy-tailed Lévy flight and ordinary Brownian motion — α=2.0 switches the sampler to a plain Gaussian (Box–Muller) generator. Walkers sets how many independent paths are drawn at once, Steps per frame controls simulation speed, and Scale zooms the flight-path view. The three preset buttons jump straight to α=1.2 (strong Lévy), α=1.5 (mid) and α=2.0 (Brownian) for quick comparison.
Lévy flight statistics were proposed by Gonzalo Viswanathan and colleagues in the 1990s as a model for how albatrosses, sharks and other foraging animals search for sparse, patchily-distributed food — a strategy shown to be more efficient than a random Brownian search when resources are scarce. The same heavy-tailed statistics turn up in financial market price jumps and in some models of human mobility patterns.
A Lévy flight is a random walk whose step lengths are drawn from a heavy-tailed, power-law distribution P(l) ∝ l−(1+α) with stability exponent α between 0 and 2, rather than from a Gaussian. Because the tail decays slowly, rare but extremely large jumps are far more likely than in Brownian motion, where step sizes cluster tightly around a mean and huge jumps are effectively impossible. Setting α=2.0 in this simulation switches the step generator to ordinary Gaussian sampling, recovering standard Brownian motion as a special case.
It uses the Mantegna algorithm, a practical numerical method for sampling from a symmetric α-stable distribution without needing the distribution's unwieldy closed-form density. Two normal random variables u and v are generated, u scaled by a factor σ computed from Gamma functions of α, and the step length is l = u·σ / |v|^(1/α). This produces samples whose tail asymptotically follows the correct l−(1+α) power law for any α in (0,2), which the live log-log histogram in the simulation visually confirms.
α sets how heavy the tail of the step-length distribution is: smaller α (near 1.05) produces very heavy tails and frequent extreme jumps — a true Lévy flight — while α close to 2.0 produces a thin-tailed, near-Gaussian distribution indistinguishable from Brownian motion. The tail exponent shown in the stats panel as β equals 1+α, matching the exponent in the power-law formula P(l) ∝ l−(1+α) that the simulation is built around.
At high α (near 2.0) the walker takes many similarly-sized steps, producing a compact, cloud-like trajectory typical of diffusive Brownian motion. At low α (near 1.05) most steps stay small, but occasionally the walker takes a jump orders of magnitude larger than the rest, instantly relocating far from its previous cluster of steps — visually this appears as tight clumps of short segments connected by a few long straight lines, the signature look of a genuine Lévy flight.
Lévy flight statistics were originally used to describe certain physical diffusion processes, but researchers later found the same heavy-tailed step patterns in the foraging trajectories of albatrosses, sharks and other predators searching for sparsely distributed prey, since a mix of many short and occasional long jumps searches an area more efficiently than pure Brownian motion. Similar power-law statistics also appear in human mobility data, some models of financial market price jumps, and in the spread patterns of certain diseases.