How does a world seed make the same world every time?
Computers can't flip coins, so games make random-looking numbers with a formula. Multiply the last number by a big number, add another, and keep only the remainder after dividing. Start from the seed and every number after it is fixed, so the hills, caves, and trees come out exactly the same every time.
- First random number
- 12,524
- Tallest column (blocks)
- 10
- Trees
- 4
Real games use bigger, better generators and smooth “noise” functions for terrain, but the idea is the same: every block follows from the seed.
Challenge: Find a seed that grows 8 or more trees.
Play
Press "Run it: generate the world," then change the seed by just 1 and generate again.
Challenge: Find a seed that grows 8 or more trees. The box under the picture turns green when you get it.
Stuck? Pick one of the examples from the “Try an example” menu, or press “New example.”
Understand
A computer can't flip a coin, so a game makes pseudo-random numbers with a formula. Start from the seed, multiply, add, and keep the remainder:
"Mod" is the remainder after dividing, the same idea as a clock wrapping around. Each number becomes the height of one column of blocks. Smoothing averages each column with its neighbors to turn spikes into hills, and a second run of numbers decides where trees grow. Press "Run it" to watch the world build column by column.
Use
Every input has a unit menu, so you can type values in the units you already have. Results follow your units.
Show the work
- Multiply the seed, add a number, and keep only the remainder after dividing by 65,536
x_1 = (25173 \times 41095 + 13849) \bmod 65536 = 12524 - Do it again to the answer for the next number, and again, and again
x_2 = (25173 \times 12524 + 13849) \bmod 65536 = 52341 - Turn each number into a column height from 3 to 10 blocks
3 + \left\lfloor \frac{12524}{65536} \times 8 \right\rfloor = 4\ \text{blocks} - The same seed gives the same numbers, so the same world
\text{seed } 41095 \to 12524, 52341, \ldots\ \text{every time}
Export
Pick a seed and how smooth the hills are. Then change the seed by 1 to see how different the next world is.
- This is a small, classic generator. Real games use longer formulas, but the seed works the same way.
For learning and estimation. Verify with applicable codes, standards, and a qualified professional before using in design, construction, or safety-critical work.
Cheat card
| Symbol | Meaning | Unit |
|---|---|---|
| the seed | ||
| the nth random number | ||
| the remainder after dividing |
- Mod means keep the remainder. 17 mod 5 is 2, because 17 = 3 × 5 + 2.
- Change the seed by just 1 and the numbers scramble, so the world looks completely different.
- These numbers only look random. Anyone with the same seed and formula gets the same ones, which is why players can share seeds.
Where it’s used
- Computer Science
Games like roguelikes generate new levels from a seed, and speedrunners replay the same seed to race fairly. - Computer Science
Scientists use seeded random numbers so others can repeat their simulations exactly. - Hobbies & Crafts
Players share Minecraft seeds so friends can explore the exact same world.
Related exhibits
- Start here
Why far things look small: how 3D games draw a flat screen
Size on screen = focal length × real size ÷ distance. Twice as far looks half as big, and the FOV slider in your settings changes the focal length.
- Go further
Euclidean rhythms: world grooves from one rule
Spread a few hits over a bar as evenly as you can. That one rule rebuilds the tresillo, the bossa nova, and the West African bell.
- Also try
Capos and transposing: music runs on a 12-hour clock
After B comes C again, so moving up 5 semitones from A lands on D. A capo, a key change, and a B♭ trumpet all use the same clock math.
- Also try
Dice odds: what are my chances of rolling it?
Why 7 shows up so often with two dice, and what that means for your next move.
Questions people ask
What is a world seed?
The starting number for the game's random-number formula. Every random choice when building the world comes from it, so the same seed always gives the same world.
Are the numbers really random?
No, they're pseudo-random. They follow a formula, but they jump around so much that they look random.
What does mod mean?
Divide and keep the remainder. It's the same math as a clock, where 13 o'clock wraps around to 1.
Updated : First published.