swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Robustness Check


From: Sven N. Thommesen
Subject: Re: Robustness Check
Date: Fri, 09 Jul 1999 10:50:16 -0500

At 03:42 AM 7/9/1999 -0400, Ted Belding wrote:

>I may be wrong but I get the impression from your email that we don't
>disagree about this. 
>-Ted

You are correct about that; I have no issue with what you wrote.

>I didn't mean to imply that
>the Swarm RNG library didn't have these features, and I apologize if I
>gave that impression. 

I suppose that was what raised my interest, fiercely proud as I am of my
own random babies ;-)

>While Swarm is important in its own right, I'm personally more concerned
>with issues about RNGs in general, and that's what I tried to address in
>my first email. 

Since there may be lurkers on the list who are new or who have not thought
much about their random generators, I'll just add these comments to Ted's
excellent discussion:

1. To make things easy for the casual simulator, Swarm implements a default
random generator of the class MT19937. This generator has an immense period
and good quality (in theory at least; the implementation has been tested,
but comes with no guarantees ;-)  It should certainly be adequate for
casual simulations.

2. If you start a Swarm simulation with './name' or './name -b' the
simulation will start with the SAME SEED EVERY TIME. (Read that one again!)
If you want successive runs to start with different ('randomly' chosen)
seeds, add the '-s' switch to the command line. Swarm will then generate a
seed value based on the current clock time and other factors. 

3. When running multiple simulation runs for modelling purposes, it is
always a good idea to record what seed was used for each run.

4. Swarm has a large number of generator classes implemented. Some of those
are there for historical purposes and are NOT RECOMMENDED FOR SERIOUS
SIMULATIONS. See the documentation! Of those recommended for use, only the
PMMLCGx classes have so short a period that their state is a single 32-bit
value (i.e. their period cannot be longer than 2^32). These generators are
not likely to be useful for serious experiments.

5. For the other recommended generators, the period is (much) larger than
2^32, and their state bigger than 32 bits. The mechanism provided for
starting up a given generator with a single 32-bit seed will use the
provided value to seed an internal LCG generator, which in turn is used to
draw enough values to provide however many integers are needed to fill the
chosen generator's state. While this procedure would seem to give starting
states that are in some sense 'far apart', there is no guarantee that two
seed values could not give random streams that show some overlap,
especially if the needed streams are long.

6. For those who truly worry about this, the Swarm generators allow you
total control over their starting state: instead of using a single seed
value as described above, you can if you choose initialize the state
directly (in the case of the default mt19937 generator, this requires 624
integer values.)

7. Although the default generator is of good quality, it is always a good
idea before you publish any simulation results to repeat your experiment(s)
with some other random generator supplying your variates -- you want to
make sure that your results are not just an artifact of the algorithm of
the generator used! 

8. After much discussion on this list and internally at SFI, it was decided
to provide a single default random generator, since many felt that using a
single source of randomness for all purposes within a given simulation is
the best approach. Another possibility is to give each user (object/agent)
of randomness its own random generator. If you do this, take care to avoid
a situation where two such agents end up using random streams that are
perfectly correlated!

Happy simulating,
Sven Thommesen



                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]