3 ms·
I might be missing something, but the three predicated values are not in the "nextSeed" table? Whereas the original three are. EDIT: I feel like I miss somethi
by Insanity 8y ago
I might be missing something, but the three predicated values are not in the "nextSeed" table? Whereas the original three are.
EDIT: I feel like I miss something in the explanation. Can anyone explain how the seed table is actually used?
- Insanity 8y agoEdit again: I think I figured it out(?). The previous values are 'recorded' in the seed array, but the last one (2012846163) is what you put the offset to for generating the next one. The next one is generated and in it's turn becomes the 'seed' etc. So the new values wouldn't be in the array _yet_ at the point we inspected. But all we have to do is 'replay' the RNG starting at the 'previous recorded value' to be predicting it correctly?
- lowleveldesign 8y agoThe seed array is an internal state of the PRNG algorithm. It evolves over time and PRNG uses values from this array (plus some additional parameters, such as inext or inextp) to generate new "random" numbers. Thus, after seeding, there is no real randomness in the non-cryptographic PRNGs. To learn more, have a look at Marsenne Twister, which is also quite popular and has a nice description in Wikipedia [1]. [1] https://en.wikipedia.org/wiki/Mersenne_Twister https://en.wikipedia.org/wiki/Mersenne_Twister
- Insanity 8y agoThanks for the link! I kind of figured it out over time, but the explanation helps! And thanks for the interesting article btw, just realised you're the author :-)
- lowleveldesign 8y agoThanks :)