davidrmiller / biosim4

Biological evolution simulator
Other
3.21k stars 460 forks source link

Add params for deterministic RNG #30

Closed davidrmiller closed 2 years ago

davidrmiller commented 3 years ago

This branch implements new config parameters named "deterministic" and "RNGSeed" and modifies the way the global RNG object is initialized. Comments are welcome.

At the same time, I tweaked a few of the default parameters in biosim4.ini (e.g., 4 threads instead of 10). I also modified the internal defaults to be the same as those in biosim4.ini, so that even if biosim4.ini was an empty file, the simulator would still run with the same parameters.

Asa-Hopkins commented 3 years ago

Looks good, might it be worth adding an assert in the deterministic case to make sure none of rngx, rngy, rngz or rngc are 0?