tags:

views:

254

answers:

4

Very simple question. What does the term 'seeding' mean in general? I'll put the context, i.e., you must seed for random functions.

+11  A: 

It means: pick a place to start.

Think of a pseudo random number generator as just a really long list of numbers. This list is circular, it eventually repeats.

To use it, you need to pick a starting place. This is called a "seed".

Doug McClean
Some slides that talk about seeding. <www.fi.muni.cz/~xkrhovj/lectures/2006_PA168_PRNG_slides.pdf> A simple LSFR PNRG is likely the easiest way to visualize this. See <http://en.wikipedia.org/wiki/Pseudorandom_number_generator> and the associated links.
pst
+1  A: 

"Seeding" random function prevents it from giving out the same sequence of random numbers. Think of it as a super-random start of your random generator.

Zepplock
+2  A: 

Most random functions that are common on personal computers aren't random, but deterministic to a degree. The 'seed' for these psuedo-random functions are the starting point upon which future values are based. This is useful for debugging purposes: if you keep the seed the same from execution to execution you'll get the same numbers.

To get numbers that are more random a different seed is often used from execution to execution. This is often based on the time of the machine.

This method is completely different than generating a 'true' random number based on some sort of physical property in the world around us. Lava lamps and sun spots are two of the more 'fun' properties that can be observed to generate 'more random' numbers. Anyone can hit http://www.random.org/ to get a real random number if its truly neccessary like for a poker website. If you don't have a good generator folks can attempt to figure out how the generator works and predict future numbers.

popester
+1  A: 

Imagine a card game and development of the game program vs. running the game to actually play it.

Pseudo-random number generators use a seed or seeds to determine the starting point of the sequence. Some of them always make the same sequence, others can produce different sequences depending on the seed. Some use a cascade, a simple RNG is given a simple seed, and this is run for a while to produce a more complex seed for the masterpiece RNG.

It is quite useful to be able to deliberately repeat the sequence when developing the program or when one wishes to reproduce previous results.

However, imagine a card game. It's obviously not a good idea to always deal the same sequence of cards.

DigitalRoss