[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swarm-Support] Random number generators
From: |
paul box |
Subject: |
Re: [Swarm-Support] Random number generators |
Date: |
Wed, 20 Jun 2007 22:14:21 +0930 |
If your program is called "heatbugs" (pulling some random name out of
thin air), you can type at the command line
heatbugs --help
or
heatbugs -?
And a list of command line options will come up. One of those (I
think -v) will give a seed based on the time stamp, and another (I
think -S) will allow you to set the seed to a particular value.
On 6/20/07, Diego Corredor <address@hidden> wrote:
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
>
_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support
--
//////////////////////////
// Paul Box
// Alice Springs, NT Australia
//