swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] Random number generators


From: Diego Corredor
Subject: Re: [Swarm-Support] Random number generators
Date: Wed, 20 Jun 2007 07:36:20 -0500

But how do you change the random seed then?

2007/6/17, paul box <address@hidden>:
That's not a bug, that's a feature ;-)

When you're developing a simulation, you're first worry is to get the
code doing what you think it's supposed to be doing.  If your program
depends on a random number stream somewhere, it can be very hard to
figure out if the funny behaviour comes from the model itself or
something unintended in your code.  This can be very hard to track
with random number streams.  By running with the same random number
stream each time, it's much easier to debug.

A random number generator run several times with the same seed will
give you the same sequence of random numbers.  This is swarm's
default, and very helpful when you're developing.  Once you're happy
that your program is doing what you intended, then you can set new
random number seeds from the command line.  You can also record what
those seeds are in your experimental notes.  Knowing what seed you ran
your program with is important, if you want to be able to repeat your
results.

Paul

On 6/15/07, address@hidden <address@hidden> wrote:
>
> I am a new user to swarm and have my first model built!  I am using two random
> number generators: getIntegerWithMin$withMax() and Globals.env.Randomized to
> randomized the actions.  Running the model multiple times I get the same 
output.
>
> Shawn
> _______________________________________________
> Support mailing list
> address@hidden
> http://www.swarm.org/mailman/listinfo/support
>


--
//////////////////////////
// Paul Box
// Alice Springs, NT  Australia
//
_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support



reply via email to

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