-
Notifications
You must be signed in to change notification settings - Fork 73
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
Using wyhash64 to mix numbers into prngs? #127
Comments
yes. you can fix one parameter as seed and use another one as counter. more: more: This algorithm can bee ported to GPU and cuda and serves as a parallel PRNG. |
Excellent, thank you. I actually need 4 independent streams so I wrote up a quick test harness to write them out interleaved and passed them to BigCrush and PractRand. I used these four values as seeds:
And they passed all the BigCrush tests and 4TB and counting of PractRand. |
Last question: is wyhash64 reversible? Thus collision free? |
no, it is not reversible nor collision free. However, as a 64 bit PRNG, the space is so large, you can safely use it as BigCrush and Practrand are PRNG standard. More words are: collision is true random but collision free is not true random... Imagine I have a dice to bet with you. You observed 5 rolls: 1,2,3,4,5. If you know the dice is collision free, you can bet on 6 with all your money. But if it is not collision free, it is still fair. |
Ok that makes sense, as long as it's deterministic that's my important criteria =D |
I noticed this comment here that wyhash64 can be used to generate deterministic random numbers that pass PractRand. Is there any recommendation on a good way to do that? Should I just pick a seed for B and a counter for A?
The text was updated successfully, but these errors were encountered: