15

Seeds, in procedurally generated video games, are basically identifiers for the world that's generated. They're random strings or codes for specific worlds, and you can also sometimes input a seed into the game to play on the exact same world, with everything in the same place, that the seed is associated with.1

What's the origin of the word 'seed' being used in this context? It's a pretty ubiquitous term, but it doesn't quite match its usage (at least for me), so I'd be interested to know how it came about.


1: At least as far as I understand it, which is probably apparently wrong.

4
  • 16
    Oof. Time for me to dust off my computer science degree. How long you got? Commented 2 days ago
  • 9
    What Robotnik said. seed when related to randomization is very much a computer science term and predates video games as a whole. Commented 2 days ago
  • 13
    "Seeds [...] are basically identifiers for the world that's generated." -> No, they are not. They are literally the small bit of data from which the whole world is born. In other words: you seem to think that first 1. the world is generated, and then 2. it is assigned this little string as an identifier — but it is exactly the other way around: you get this little string and "sow" it into the world generator and a whole world "sprouts" from it. Hence the name "seed". (See below for an actual technical response.) Commented yesterday
  • 2
    Useful question from Stack Overflow: stackoverflow.com/questions/15388324/… Commented yesterday

4 Answers 4

39

Computers are deterministic1

In mathematics, computer science and physics, a deterministic system is a system in which no randomness is involved in the development of future states of the system. A deterministic model will thus always produce the same output from a given starting condition or initial state.
Deterministic Systems — Wikipedia

Think of a computer like a cook who has been handed a recipe (a program) to bake a cake. Computers do not deviate from the instructions (input) in a program, meaning that each cake they bake (output) will be identical.


So how do programs (including games) implement randomness?

xkcd 221: Random Number
Comic #221: Random Number — xkcd

A mathematical formula is used to "fake" randomness. This is known as a Pseudorandom Number Generator (PRNG), often abbreviated to just Random Number Generator (RNG).

The problem is, being a mathematical formula — if you give it the same input value, you'll get the same output value. So what a PRNG does is feed the values it generates back into the formula to get more values, and so on. But we're left with a problem:

What is the initial starting value?

This is where the "seed" gets its name. It's a seed value, a number used to start the random number generator, so that it may generate future pseudo-random numbers.

In most games, the seed is determined automatically using a few tricks, like deriving a value from the system clock, or the number of frames generated before user input. But this is also why clock manipulation or frame-counting are popular tactics in speedrunning circles — because they can take the "randomness" out of certain actions, to guarantee a more perfect run.

Other games like Minecraft, which relies heavily on randomness for it's world generation, allow you to manually specify a seed to get the "same" world generation.


Math/Comp-Sci crash course:

Just for fun, let's look at a working example of a basic pseudorandom number generator2:

Next_Value = (Multiplier * Current_Value + Increment) % Modulus

The Modulo % operator gives us the remainder after division by the Modulus. For example, if 10 / 8 = 1 r2, then 10 % 8 = 2. So let's set some values in the formula, and generate numbers between 0 and 100:

Next_Value = (7 * Current_Value + 5) % 101

We need to seed Current_Value with something, so let's use a seed of 1:

Current Value Formula Next Value
1 (Seed) (7 * 1 + 5) % 101 12
12 (7 * 12 + 5) % 101 89
89 (7 * 89 + 5) % 101 22
22 (7 * 22 + 5) % 101 58

and now, let's try a seed of 42:

Current Value Formula Next Value
42 (Seed) (7 * 42 + 5) % 101 97
97 (7 * 97 + 5) % 101 78
78 (7 * 78 + 5) % 101 46
46 (7 * 46 + 5) % 101 24

As you can see, we're getting some "fake" random numbers, based off a seed value! Pretty cool, right?


  1. This is true for most computing applications you'll encounter day-to-day. In specialised cases (such as high-security applications) computers can act as non-deterministic systems by utilizing True Random Number Generators (TRNGs). These devices measure unpredictable physical phenomena (such as thermal noise or radioactive decay) to generate data that is truly random and not based on a formula.
    Non-deterministic behaviour may also be observed from situations such as multi-core processing (race conditions), hardware faults, or Single-Event Upsets (SEUs) (i.e. cosmic rays flipping bits, etc)
  2. This type of PRNG is known as a Linear Congruential Generator (LCG). There are other (more robust) PRNG formulas, this one just serves as a good simple example. This LCG will loop after about 100 iterations, and visit almost every number in the range 0-100, except 16. This is a consequence of the specific parameters chosen for the example. 16 is a "fixed point" for this specific equation (if you use 16 as the seed, you get 16 back: (7*16+5 = 117 -> 117%101 = 16)
13
  • 5
    One thing I would add here is that it is technically possible for real computers to produce numbers that are for all intents and purposes random by using other hardware, such as by measuring thermal noise. However, those methods produce random sequences very slowly, so they are impractical for most applications, and when they are used, it is usually just to generate a PRNG seed. Commented 2 days ago
  • 5
    Conversely, there's also the saying, "The generation of random numbers is too important to leave to chance!". Since Humans are bad at estimating "randomness", pseudorandom numbers can lead to better feelings of "randomness" than actually random numbers! That's the exact kind of gamefeel that's relevant in games. Commented 2 days ago
  • 4
    @murgatroid99 I think I overloaded my terminology - I agree that pesudorandom number generators should be statistically indistinguishable. My larger point was - sometimes "mostly-random" makes for better gameplay. (e.g. Fire Emblem's various 2RN systems) Commented yesterday
  • 3
    42 mentioned, yay! Also +1 for computer science degree Commented yesterday
  • 3
    @AlexanderThe1st The fixed point is not a general property of PRNGs or even LCGs, it is a consequence of the specific parameters chosen for the example. The Linear congruential generator Wikipedia article describes how the choice of those parameters affects the behavior, and it specifically notes that there are choices of parameters for which every seed has the full period. Commented yesterday
11

Robotnik has well explained why this word is used - it is the single number from which the whole world is 'grown', just like a plant from a seed. In terms of history, the Oxford English Dictionary has its first citation from 1972($), which is not to say that no earlier usage exists of course.

Mathematics. A number or vector used as an initial value in an algorithm, esp. for the purpose of generating a sequence of pseudorandom numbers.

1972

Seed,..that randomly selected number, 0≦U0≦1, from which all succeeding random numbers derive by means of an algorithmic, pseudo-random, number generator.

Journal Statist. Computation & Simulation vol. 1 41

1984

Here we have..a 32 bit number which can act as a seed or a number.

Which Micro? December 36/3

2014

We set the seed for the random generator.

A. Bari et al., Predictive Analytics For Dummies xiv. 262

Note that by 2014 the author feels no need to even slightly explain what a seed is.

1
  • "a 32 bit number which can act as [...] a number." ... what an odd choice of phrasing. I wonder what the full context for that statement is. Maybe the author initially started to write "a seed or [something]", where "[something]" might have been "an initial value" or similar and that then got edited and chopped down to "a number" which no longer makes much sense in the final version. Commented 12 hours ago
1

The other answers have done an excellent job of explaining what "seed" means in the context of random number generators. In the world of gaming in particular, its prevalence is almost certainly due to Minecraft.

While Minecraft wasn't the first game to feature a procedurally generated world, it revolutionized the genre, spawning countless clones and copycats. Since Minecraft allowed the user to input a custom seed to the world generator, seed sharing became a popular activity in the community. The complexity of the world generation and its importance in gameplay encouraged players to share seeds that would lead to particularly interesting or useful features (often things like rare resources being easily available, or instances of multiple rare structures being generated near each other, or just cool-looking terrain). Websites also sprang up that would take in the world seed as input, and then use a reverse-engineered version of Minecraft's world generator to give information like a map of the world or the location of useful structures and resources.

While I don't have any solid proof of this, I think it's safe to say that the reason so many other games since then have exposed the world seed as a parameter to the player is because of the expectations that Minecraft set. As an example, the Wikipedia article for map seed only discusses Minecraft and several games directly inspired by it.

New contributor
Carmeister is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. Commented yesterday
1

Others already explained what it actually refers to.

The earliest use I can find for the term "seed" is in 1958. Though this doesn't concretely define the term, so it's possible that it was already a known term at that point, and originated from even earlier.

In 1958, The Cornell Research Simulator by Richard W. Conway, Bruce M. Johnson and William L. Maxwell:

0937 is the random number seed for read.

In 1961, Some Problems in Queue Simulation by Scott Garney Lewis:

Seed for arrival dist'n random number generator

In 1965, On-line Computation and Simulation: The OPS-3 System by Martin Greenberger:

To initialize the random-number generator to 3597, the user executes the SEED operator as follows: ...

The discontinued IITRAN programming language created in the mid-1960s also had a "seed" keyword, as noted in Communications of the ACM, volume 12(10), Oct 1969 (and elsewhere):

.SEED Seed for random number generator

Pseudorandom number generator (PRNG) originate from before 1958: The Lehmer generator was published in 1951. The middle-square method was described in 1949 (originating from the 1240s). But they didn't use the term "seed" in their initial publications.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.