A catalog of predictable generators
prngs
…generators, in this page
Every pseudo-random number generator in the catalog — from a 1957 Ferranti library routine to the one in your JavaScript engine — compiled into a single WebAssembly module and running here. Pick one, seed it, and watch what it does.
loading module…
What a pseudo-random number is
A computer cannot roll a die. It can only compute, and computation is deterministic: the same state always produces the same next state. A pseudo-random number generator embraces that. It keeps a small hidden state, applies a fixed rule to step it, and emits part of the result. Seed it with the same value and it will hand you the same sequence, forever, on any machine.
That is not a flaw. It is the point. Reproducibility is what makes a simulation repeatable, a test deterministic, a game's world the same for every player who enters the same seed. The classic recurrence, the linear congruential generator, is a single line: x ← (a·x + c) mod m. Multiply, add, wrap. Most of the generators on this page are variations on that line, on a shift register, or on a handful of xor-and-shift steps.
What “predictable” means here
This catalog collects generators whose entire output is determined by their seed. Once seeded, no further entropy enters: no reseeding from an operating-system pool, no timestamp mixed in mid-stream, no hardware noise. Being cryptographic is not disqualifying — a stream cipher run in a deterministic mode qualifies. What does not qualify is anything that keeps drawing on the outside world while it runs.
Predictability is exactly the property that makes these generators interesting to study, and occasionally dangerous to deploy. Observe a few outputs and you can often recover the state; recover the state and you know every value that will ever follow.
Explore
values per draw
speed
Browse the catalog
Don't know an id? Filter by name, family, or category, or tap a group below. Ordered by how widely each generator was actually used, so the famous ones come first. Click a row to load it.
- id
- kind
- family
- category
- period
- seed space
- seed bits
- output bits
- outputs to predict
- relevance
First draws
—
Distribution
Sixty-five thousand draws, bucketed by their top six bits into sixty-four bins. Every bin should land near 1,024, so drawing the raw counts makes even a broken generator look like a flat wall. Instead each bin is a candle showing how far it strays from 1,024 — solid above, hollow below — against the shaded band of ordinary random noise. A sound generator's candles flicker inside the band; a biased one breaks out of it.
Deviation of each bin from the expected 1,024, over 65,536 draws. Bands are ±1σ and ±2σ of the expected count noise (σ ≈ 31.8).
expected per bin 1024min —max —χ² — (63 d.f.; ≈ 63 is uniform)
Four thousand consecutive pairs, top nine bits of each, as points. A good generator fills the square evenly. A weak one draws lines — try RANDU.
Statistical properties
Measured live over the same 65,536 draws each time you draw, treating each output as a fraction in [0, 1). A sound generator sits at every ideal; the ink bar marks a value that has drifted off.
std deviation
—
ideal 0.28868
serial correlation
lag 1
—
ideal 0
worst bit bias
most-skewed bit
—
ideal 0
Serial correlation is the tell a plain histogram misses: it measures whether each value leans on the one before it. A truly independent stream sits near zero; many old linear generators do not. Worst bit bias reports the single most-skewed of the 32 output bits, which is how a linear generator's low bits give themselves away even when the values as a whole look uniform. Try RANDU: its distribution and mean look fine, but its lowest bit never changes.
How this page is verified
The module here is not a port. It is the catalog's own C implementation compiled with Emscripten, and on every commit the build is checked against the native binary: each of the generators is seeded identically in both, eight values are drawn from each, and the two must agree line for line. If they don't, nothing is published. The count at the top is read from the module at load time, not typed in.