netlogo - Using multiple random seeds to keep agents and environment separate -


i have simulation proceeds in 2 general flows, (1) environment changes, , (2) agents thing.

i've designed environment , agent behavior independent. important because want able simulate experiment in environment evolves in repeated pattern across runs, agent variables change.

i know can run environment using "with-local-randomness", works if can maintain 2 random seeds across time. don't see obvious way of doing this.

one idea considered initialize environment list "environment-seeds" list of 1000 new-seeds, each time call with-local-randomness next seed off list (hoping don't run out accident). unfortunately don't have idea how keep list across runs, other hard-coding it.

tl;dr need 2 have 2 random number generators, based on different seeds, , need able switch 1 being used given call in code.

thanks lot ideas!!

doing want impossible unless write extension gives more control on rng state offered primitives built in netlogo. (to see how saving , restoring rng state looks, @ code export-world , import-world use it.)

but think environment-seeds idea workaround. store seeds in file , use file-read pull them out. or, generate them on fly using separate rng, provided adam mackenzie's rng extension, listed @ https://github.com/netlogo/netlogo/wiki/extensions ; wouldn't have worry running out. there might clever way of generating each seed function of previous seed without involving extension, actually. how making next seed first number generated rng after being initialized (inside with-local-randomness of course) previous seed?


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -