devosoft / Empirical

A library of tools for scientific software development, with emphasis on also being able to build web interfaces using Emscripten.
Other
86 stars 38 forks source link

Using ResetSeed does not reset all state #462

Closed emilydolson closed 1 year ago

emilydolson commented 2 years ago

Calling ResetSeed on an emp::Random object resets the internal weyl_state but does not reset the internal value. Consequently, if you call ResetSeed with the same number in two different runs, you will get a different sequence of random numbers. Is this the intended behavior? If not, I can push a fix. Otherwise, maybe we should add a method that does a complete reset.

mmore500 commented 2 years ago

This is not an intended behavior. Fix would be great!

On Sun, Jan 9, 2022 at 7:42 PM Emily Dolson @.***> wrote:

Calling ResetSeed on an emp::Random object resets the internal weyl_state but does not reset the internal value. Consequently, if you call ResetSeed with the same number in two different runs, you will get a different sequence of random numbers. Is this the intended behavior? If not, I can push a fix. Otherwise, maybe we should add a method that does a complete reset.

— Reply to this email directly, view it on GitHub https://github.com/devosoft/Empirical/issues/462, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSDYRLRHYIUMLP4BQNANGTUVITNVANCNFSM5LSPPXLQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Matthew Andres Moreno https://mmore500.github.io

amlalejini commented 1 year ago

Fixed by pull request #486