[chuck-users] random seed
signal.automatique at gmail.com
Sat Sep 11 02:19:19 EDT 2010
Let me address your points in reverse order;
> So the only way is to delete the seed and restart the sketch?
Short answer; "no". Long answer; a PRNG (pseudo random number generator)
typically consists of a number and a function. The function is set loose on
the number and the outcome becomes the new number and is returned as the
random value. Sometimes only part of the number, like the
least significant bits are returned.
It follows that these functions must make sure this series of numbers takes
a long time before they repeat, that the "seed" simply determines at what
part of the cycle we start and that talking about "deleting the seed"
doesn't actually make a lot of sense.
> That's very sad! A seed is perfect to get a repeating pattern, but
> sometimes it's nice to turn off the seed to get non repeatable values.
> I'm not sure whether this is "sad"... it's simply a fact of life in
computer science. The numbers are never really random and *if you knew the
seed* they are easy to repeat. They just look random and for a decent PRNG
it should be very hard to figure out what the seed was. This might be so
hard that we'd all be gone by the time some process determines it.
So; in practice this difference between repeatable numbers and truly random
ones shouldn't matter too much.
On the other side; it may very well be that something went wrong in the case
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users