random number seeds

238 views
Skip to first unread message

Steve

unread,
Mar 10, 2009, 4:49:49 PM3/10/09
to beast-users
Hi,
I'm sorry if this is a simple question, but I'm a little confused
(well, more than a little). I ran BEAST on the Cornell site with 5
different runs. By chance, there were a couple pairs of runs that had
the same random number seed. These pairs of runs have the exact
likelihood tracings for the various parameters for all 20,000,000
steps. According to Robert Bukowski, who kindly answered my
questioning of why, the results will be the same as long as the infile
and random number seeds are the same. Doesn’t this then mean that the
searching is a deterministic process? With different random numbers I
get different likelihood tracings, as expected. Can someone explain to
me why two runs with the same random number see search the exact same
parameter space?

Thanks,
Steve Karl

Andrew Rambaut

unread,
Mar 10, 2009, 9:06:33 PM3/10/09
to stev...@gmail.com, beast-users
Dear Steve,

Random number generators (RNG) is a big topic. Unless your computer
has hardware to generate truly random numbers from radioactive decay
computer simulation uses pseudo random number generators.

Take a look at this article about pseudo random number generators:

http://en.wikipedia.org/wiki/Pseudorandom_number_generator

BEAST uses the Mersenne twister RNG mentioned.

To summarise, although a given RNG will give an identical sequence
for a given seed, you shouldn't be able to predict what a sequence
will be for seed B if you know the sequence for seed A (even if A
and B are close). Then all you need to do is use a different seed
each time (BEAST uses the computer's internal millisecond clock -
the number of milliseconds since 1970 - when the world began).

Andrew
___________________________________________________________________
Andrew Rambaut
Institute of Evolutionary Biology University of Edinburgh
Ashworth Laboratories Edinburgh EH9 3JT
EMAIL - a.ra...@ed.ac.uk TEL - +44 131 6508624





--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply all
Reply to author
Forward
0 new messages