What does 'seeding' mean?

可紊 提交于 2019-11-26 09:51:25

问题


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


回答1:


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.




回答2:


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".




回答3:


"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.




回答4:


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.



来源:https://stackoverflow.com/questions/1619627/what-does-seeding-mean

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!