-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use random seed when set to 0 or -1. #10
Comments
sbates130272
added a commit
to sbates130272/bp_osd
that referenced
this issue
Oct 7, 2021
It is useful to be able to seed the RNG with a seed that is based on the current time. This ensures different simulations generate different results. However simulating with a known seed is also useful. This commit will use an input seed if that seed is >0. Otherwise it will generate a seed based on the current system time. In all cases the seed used is written to the output file. Fixes quantumgizmos#10.
@quantumgizmos I have pushed a branch to my fork of this repo and will open a PR you can review. |
sbates130272
added a commit
to sbates130272/bp_osd
that referenced
this issue
Oct 7, 2021
It is useful to be able to seed the RNG with a seed that is based on the current time. This ensures different simulations generate different results. However simulating with a known seed is also useful. This commit will use an input seed if that seed is >0. Otherwise it will generate a seed based on the current system time. In all cases the seed used is written to the output file. Fixes quantumgizmos#10.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is standard practice to generate a random seed from the current time when a specific seed is not set. This means simulations are truly random and don't repeat over and over again.
Update the code to use a seed from the current time if the input seed is (e.g. 0). Also record that seed in the output file for regeneration purposes. If input seed is >0 then use that.
Also update README to reflect this change.
The text was updated successfully, but these errors were encountered: