Skip to content
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

Consider using np.random.default_rng for self-contained randomness #135

Open
micimize opened this issue Nov 8, 2022 · 1 comment
Open

Comments

@micimize
Copy link

micimize commented Nov 8, 2022

Setting np.random.seed is alright, but IMO it would be better to add a seed + RNG to each generator using np.random.default_rng(seed) so that their RNG is self contained.

This is because a lot of other code mazelib gets integrated with may make use of the "global" rng, making reproducibility more challenging for depending projects.

@john-science
Copy link
Owner

That seem like a cool idea, sure.

I should probably read the docs there and play with the two, just to make sure. But from your description, I agree that would be a useful improvement.

I'm for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants