Page 1 of 1

Question on the nature of randomness...

Posted: Sat Nov 09, 2013 1:39 am
by Muddyboots
Okay, first off, as a 35 year veteran of RPGs Dicenomicon is a dream come true!!!!

Thank you soooooooo much!

Now, my question: what is the nature of the randomness of the engine behind Dicenomicon? Is it pseudo random or true random? Is there anything you can say about HOW the numbers are generated?

Thanks in advance.


Re: Question on the nature of randomness...

Posted: Sun Nov 10, 2013 3:11 pm
by Uranium Dragon
Having watched a d20 roll from a 20 over to a 4 because another die bounced up against it, I'd say it's a true random engine. Now, the double tap of the re-roll that forces the die to align across the top, I can't speak to that. I have seen the "sparks" or reroll effects when double tapping my favorite rolls for stats (4d6reo1h3), so somehow it knows that 1's were going to come up.

Re: Question on the nature of randomness...

Posted: Mon Nov 11, 2013 8:57 am
by HawthornThistleberry
No personal computer is able to do "true" randomness, it's all pseudorandom. This has no effect on its utility for these purposes, though.

To oversimplify a little, the randomness in computer randomizers usually starts from something like "the number of microseconds since midnight at the moment you start using it" or "how hard you happened to shake the device", which is not random in the definitive sense, only pseudorandom, but which you certainly can't predict. It then uses some complex mathematics to scramble that up so that the difference between 19105 microseconds and 19106 microseconds is a number you could only predict by repeating the math, not linear, further obscuring and making it hard to predict.

But ultimately, it's all entirely deterministic. If you did the same roll at the same moment in the same way, you'd get the same result, every time. Hence, it's technically pseudorandom. The key to pseudorandomness is that tiny differences you can't easily see have large effects on the output, thus making the deterministic nature of the process hard to see.

To do true randomness, it would have to have something like a radioactive particle decay involved in the process.

Re: Question on the nature of randomness...

Posted: Mon Nov 11, 2013 12:14 pm
by gandreas
The Dicenomicon factors in the accelerometer into the simulation, and even if the device is laying perfectly flat and not touched, there is still a tiny bit of (truly) random noise that seeps into the system (see <> for more details). Adding even a tiny bit of entropy into a chaotic system results in "true randomness".

Note that while developing on the simulator running on my Mac, there is no accelerometer (and thus no external entropy added to the system), and so if I seed all random variables the same, I can reproduce the same series of roll. This has proved to be invaluable to debugging...

Re: Question on the nature of randomness...

Posted: Tue Nov 12, 2013 3:01 pm
by Muddyboots
Thank you everyone for your replies. I'm very familiar with the structure of hardware RNG systems in communications related applications and I've seen the software PRNG world grow by leaps and bounds. The use of the accelerometer to cause "noise" is a wonderful use of the hardware. Nice work! On the debugging using static seeds, I hear you! :lol:

On the OSX import, any thoughts of using a sound card or sound input seed?


Re: Question on the nature of randomness...

Posted: Tue Nov 12, 2013 3:34 pm
by Muddyboots
Gandreas, thanks for that paper! Fascinating. This is a game changer in a big way. I can think of a half dozen companies that are going to have to change their product offerings because of it. Really that isn't a bad thing.