random seeds

May 10, 2006 at 11:28am

random seeds

Hi randomisers…

I know that random and urn can be seeded from a number dependent on the time since system start-up (seed 0) but I’m working on something that will start-up at the same time every day, and various parts of the program will be triggered at fixed times. This suggests that theoretically I could get the same sequence of events happening every day. < < or is this extremely unlikely?>>

To avoid this i just thought of generating the seed from sampling a piece of incoming audio (microphone) – remembering that some computer (atari1040ST?) used to provide random numbers by sampling some noisy piece of circuitry -

is there a simpler, cooler way to do this? do anyones externals generate random seeds in a different way?

- i looked in the archives but people seemed to be more interested in repeating a random sequence of events!

groeten, justin.

#25903
May 10, 2006 at 1:40pm

you could use a prime number generatorr… i.e. tap.prime

or use the output of the object itself multiplied by the cpuclock ?

#76841
May 10, 2006 at 5:59pm

Hi Brian,

I was just about to say that I can’t see why either of your suggestions would make it more random. but now it suddenly dawns on me while typing: you’re right about the system clock because of course the date component is different every day.

But why Prime?

thanks, justin.

#76842
May 11, 2006 at 7:07am

#76843
May 11, 2006 at 9:26am

afaik computers report time since startup in ticks (1/60th of a second), so that would be unlikely, or at least unlikely to where the sequence might repeat once or twice a year, which you would be highly unlikely to notice. Personally I use the julian date&time.

#76844
May 11, 2006 at 9:51am

yeah, once or twice a year no-one is going to notice!
Right now i’m making a seed by mangling the current date into
a useful number. justin.

#76845
May 11, 2006 at 10:00am

maybe someone should modify the date + time object to accept the commands julian / orthodox / chinese / jewish / islamic / mayan / etc… in the interests of temporal diversity. ok, someone has probably done it already!

#76846
May 12, 2006 at 4:24am

On around May 10, 2006, at 13:28, justin bennett said something like:
>is there a simpler, cooler way to do this? do anyones >externals generate random seeds in a different way?

Yes.

The entire suite of Litter Power RNGs base their seed on multiple items drawn from the OS that will not repeat themselves. Ever. They also use an industrial-strength random number generator, rather than the Linear Congruence generator used by random and urn.

If you’re seriously interested in random numbers, you owe it to yourself to take a look at Litter Power. The Starter Pack is free. URI below.

Best, Peter

————– http://www.bek.no/~pcastine/Litter/ ————–
Peter Castine (HTML doesn’t like the rest of this .signature)

#76847

You must be logged in to reply to this topic.