Question on the nature of randomness...

Simulated dice for role playing games
Post Reply
Muddyboots
Posts: 3
Joined: Sat Feb 05, 2011 9:27 pm
IQ Test: Orange

Question on the nature of randomness...

Post by Muddyboots » Sat Nov 09, 2013 1:39 am

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.

Muddyboots

Uranium Dragon
Honored
Posts: 131
Joined: Sat Oct 09, 2010 9:42 am
IQ Test: Orange

Re: Question on the nature of randomness...

Post by Uranium Dragon » Sun Nov 10, 2013 3:11 pm

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.

HawthornThistleberry
Posts: 8
Joined: Mon Nov 14, 2011 6:05 pm
IQ Test: Orange

Re: Question on the nature of randomness...

Post by HawthornThistleberry » Mon Nov 11, 2013 8:57 am

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.

gandreas
Immortal
Posts: 1464
Joined: Wed Feb 04, 2004 6:02 pm
Contact:

Re: Question on the nature of randomness...

Post by gandreas » Mon Nov 11, 2013 12:14 pm

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 <http://www.cis.uab.edu/saxena/docs/vsh-wisec11.pdf> 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...

Muddyboots
Posts: 3
Joined: Sat Feb 05, 2011 9:27 pm
IQ Test: Orange

Re: Question on the nature of randomness...

Post by Muddyboots » Tue Nov 12, 2013 3:01 pm

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?

Mudyboots

Muddyboots
Posts: 3
Joined: Sat Feb 05, 2011 9:27 pm
IQ Test: Orange

Re: Question on the nature of randomness...

Post by Muddyboots » Tue Nov 12, 2013 3:34 pm

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.

Muddyboots

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest