random number generation

19 views
Skip to first unread message

MLS

unread,
Sep 22, 2020, 10:35:12 AM9/22/20
to netlogo-devel
Is there a way to control the random number seed when using the nw extension (or any extension)?  Thanks.

Seth Tisue

unread,
Sep 23, 2020, 9:28:58 AM9/23/20
to netlogo-devel
Are you developing your own extension? (I"m asking because this is the netlogo-devel group; perhaps you're looking for the netlogo-users group?)

jeremy...@northwestern.edu

unread,
Sep 23, 2020, 10:20:35 AM9/23/20
to netlogo-devel
As Seth said, this is a forum for creating new NetLogo extensions for NetLogo, not for answering questions about how to use them.  It sounds like you're using the NW extension in your model, so the netlogo-users group would be a better place for your question:  https://groups.google.com/g/netlogo-users 

But to answer what you asked, the NW extension uses a random number generator provided by NetLogo, so setting the NetLogo seed with `random-seed` should also affect NW: https://ccl.northwestern.edu/netlogo/docs/dictionary.html#random-seed.  

It is best practice for extensions to do it this way, to ensure reproducibility of model runs and to easily allow model authors to control the seed.

-Jeremy
Reply all
Reply to author
Forward
0 new messages