-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Multiple random generators generate the same values #1734
Comments
I tried to reproduce the bug: Code:
Output:
random() uses the same set over and over |
Yeah, this is in many ways an intended behaviour -- the idea was to guarantee reproducible results given seed, so that the user can rerun failing test and examine what happened in greater detail. I see that the linked PR centralizes handling of random generators, I'll have to think about it a bit. |
Martin, the numbers are still reproducible, but the random generator(m_rand) is kept somewhere else, to avoid reinitialization when a GeneratorTracker decides to clear its child tracker. |
Describe the bug
When using multiple random generators, they use the same seed and thus generate the same values.
Expected behavior
Each random generator uses its own seed and produces different numbers
Reproduction steps
a
andb
will always have the same valuePlatform information:
The text was updated successfully, but these errors were encountered: