# Thread: 3D dice results are not random

1. Originally Posted by Weissrolf
As a physicist and mathematician you are far more qualified to understand and interpret the results than I am. I just started looking into the test software and problems around randomness testing after my last thread on that topic was locked, seeing how all those "confirmation bias" discussions led to no quantitative or qualitative results.

Take a look at how 3D dice "float" and fall in FGU versus how they fly out of your hand (or dice cup) onto the table. To me FGU's 3D dice neither resemble real nor ideal dice, both are far off. So going for the statistical/ideal approach seems both easier and more fair to everyone. Since weighted distribution is easier measurable than expected I may have a look at D20 distribution later on.
I may have the qualification for it, but I would need to read into that stuff first But when my thesis is done, then I may have some time for it; would certainly be nice to see something different than differential geometry, gauge theory and quantization (though certain areas of probability theory use differential geometry, too, as far as I remember)

I sadly had no time yet to ever play on FGU, hence, I do not yet know how the FGU dice "feel"; but Moon Wizard wrote here that their rotation etc. might get adjusted So, they may "feel" different later on

EDIT: (a bit off topic) Itwould be nice for FGU when one could adjust certain parameters for the dice (like gravity etc.) in the settings, to change the simulation, especially when the players are on different planes of existence with different physics, or just other planets and so on But I certainly understand when that has not really priority for the devs

2. Code:
```3D dice, 1 mio. rolls, distribution of D8 results:

#1	13,01%
#2	13,07%
#3	12,90%
#4	11,41%
#5	12,86%
#6	12,90%
#7	11,21%
#8	12,65%```

Code:
```Instant dice extension, 1 mio. rolls, distribution of D8 results:

#1	12,41%
#2	12,40%
#3	12,43%
#4	12,55%
#5	12,61%
#6	12,58%
#7	12,52%
#8	12,50%```

3. Some fodder for thoughts:

#2 13,07%
vs.
#7 11,21%

This may look like only a 1.86% difference, but consider again. Yes, there is "only" a 1.86% higher chance to roll a #2 vs. a #7, but this translates to 16.6% more total #2 results than #7 results (130.700 vs. 112.100).

Compare that to the same rolls done via Instant Dice extension:

#5 12,61%
vs.
#2 12,40%

A 0.21% higher chance to roll a #5 vs. a #2. This translates to 1.7% more total #5 results than #2 results (126.100 vs. 124.400).

4. 3D dice, distribution of byte values (0-255)

Instance Dice extension, distribution of byte values (0-255)

5. Originally Posted by Weissrolf
3D dice, distribution of byte values (0-255)

Instance Dice extension, distribution of byte values (0-255)

Greetings Mr. Weissrolf,
there is a way to know the distribution of d20?
Considering the fact that d20 is a die used in a lot of the most played games, this become an important issue.
The extension solves this for all practical issues, but could be interesting to know how this affect the games (I'm thinking especially of the 5ed adv/disadvantage mechanic).
Maybe a good solution for SW to solve the issue could be to let physical rolling remain as a graphic effect( so one can mantain the fun of rolling dice) but the results are determined by the above extension code?
My best thanks.

6. Well, the extension (or /die for that matter) are not really good random generators, 3D is just so broken that in comparison /die shines brightly and might suffice for the time being. I am not sure yet if /die and the extension create comparable results. Some measurements suggest differences, but then I am of course testing different sets of rolls (1 mio. D8 each).

Using the extension seems to be leaps and bounds better than using 3D dice, though, so I told all my players to disable 3D dice. Of course that did not keep my Ranger player from rolling 4 rolls below 5 in a row. But I told him that even if he keeps missing all 4 rolls per turn at least Fantasy Grounds is not cheating on him on top of that.

I am currently in the process of collecting 1mio. 3D rolls of D20. We can demonstrate distribution from that, but we cannot send it through established randomness tests, because 0-19 does not fit into full sets of bits. I will post the distribution in 2 or 3 hours.

7. Hi Weissrolf. Interesting stuff. As other people here have mentioned, it is very difficult for anyone to understand the depth of what you've done here. I think we can all see that it is interesting, and that there is likely an issue that you have highlighted, but your explanation of the process you used is a bit hard to follow (not trying to suggest fault - this is a forum post, not a white paper! Just communicating my thoughts to you). Like others here, I am a scientist though no statistician. Have you considered putting the raw data up somewhere for download? I would likely play with it, and I'm sure others would as well.

While I want to wrap my brain around some of the methods you've used, perhaps you can answer this simple question first - what exactly is being shown in this image?
Originally Posted by Weissrolf
In the GIF you illustrate that these oscillations are roughly on a period of about 200 rolls. What is the y-axis? I assume the x-axis is # of rolls (and that this is a small subset of your total data set, owing to the fact that you show the "200 roll" scale bar, and I know you did millions of tests). What does the dark band actually indicate? Are you coloring the pixel on a grayscale where black is 1 on a d8, and white is 8 on a d8? Please elaborate.

Also, I think you have focused on the fact that certain numbers come up more frequently than others, which I agree is an issue... but to my mind and as many people have mentioned, no die is completely perfect. And though I agree these should be, and are intended to be, it probably wouldn't bother me too much. However, the issue that is more problematic to me is the thought that there are periods of time where rolls are much more likely to be low than others.

8. Code:
```3D dice, 1 mio. rolls, distribution of D8 results:

#1	46177	4,62
#2	49035	4,90
#3	54112	5,41
#4	50356	5,04
#5	54087	5,41
#6	50882	5,09
#7	48173	4,82
#8	49519	4,95
#9	48401	4,84
#10	49038	4,90
#11	48341	4,83
#12	49441	4,94
#13	49499	4,95
#14	47458	4,75
#15	50715	5,07
#16	54863	5,49
#17	50399	5,04
#18	53634	5,36
#19	49337	4,93
#20	46533	4,65```
#16: 5.49%
vs.
#1: 4.62%

There are 18.8% more #16 than #1 results (54863 vs. 46177).

It will take time to get either Instant Dice extension or Random.org distribution for comparison. I expect both to be much better, though.

9. Originally Posted by lavoiejh
While I want to wrap my brain around some of the methods you've used, perhaps you can answer this simple question first - what exactly is being shown in this image?
1 mio. D8-1 (0-7) rolls in a bitstream of 0 and 1, every 0 being black and every 1 being white. 3 bits/pixels = 1 roll, 600 pixels = 200 rolls. The image I posted is downscaled to 25% of the original image, which helps visualization. The original image is 1800 x 1667 px = 3.000.600 px / 3 = 1.000.200 px. The 200 extra pixels are empty, to fill a complete square image.

In the GIF you illustrate that these oscillations are roughly on a period of about 200 rolls. What is the y-axis? I assume the x-axis is # of rolls
There are no x and y axis. The whole image is a stream of rolls, but I found out that when I limit the x axis to multiples of 600 bits/pixels (=200 D8) then this pattern emerges. It helps visualize the periodic nature of roll results.

What does the dark band actually indicate?
The dark bands indicate result numbers consisting of more zeros (0) in their binary/bit representation, 7 = 111, 0 = 000, 4 = 010, 3=011. There are also bright bands in between the dark bands with results consisting of more ones (1) than zeros. When you increase contrast on that image it will turn into pure black/white stripes instead of blotches.

Are you coloring the pixel on a grayscale where black is 1 on a d8, and white is 8 on a d8? Please elaborate.
No, the grayscale is a product of downsampling the original b/w image to 25% size. Since every D8-1 result consists of 3 bits/pixels the bands do not represent high vs. low results, but rather certain numbers (with more or less 1 vs. 0) clutching together.

Here is the original image at full size. Make sure to open it outside of your browser, because else you very likely see it resamples using bilinear interpolation.

Attachment 41568

but to my mind and as many people have mentioned, no die is completely perfect.
FGU's 3D dice are quite completely "perfect" in that they always favor the same set of numbers over other numbers. And c'mon, how is FGU's physics emulation of dice flying and rolling anywhere close to reality? Currently we get the worst of both worlds, physics and RNG. And you often see player exchange dice at a table (for whatever effect).

To clarify one thing: When I post result distributions of 3D dice here then these distributions are specific to the chat window size of my system (2560 x 1600px display using default chat window size). In this configuration FGU's 3D dice always oscillate between these two states:

It is quite likely that another chat window size will lead to another pre-determined distribution of results. Look at this for comparison:

10. Interesting, thanks for the expanded explanations.

FGU's 3D dice are quite completely "perfect" in that they always favor the same set of numbers over other numbers. And c'mon, how is FGU's physics emulation of dice flying and rolling anywhere close to reality? Currently we get the worst of both worlds, physics and RNG. And you often see player exchange dice at a table (for whatever effect).
I'm not arguing that. I was merely trying to express that the less than perfect distribution of numbers is less an issue to me than the periodicity. I think people are much less likely to notice a 0.5% difference in frequency of a single result than they are a trend in results (periods of low or high numbers being more frequent).

The dark bands indicate result numbers consisting of more zeros (0) in their binary/bit representation, 7 = 111, 0 = 000, 4 = 010, 3=011
So, for your d8-1 bitstream
1 = 000
2 = 001
3 = 010
4 = 011
5 = 100
6 = 101
7 = 110
8 = 111

Either way, the dark period in your chart indicate a concentration of 0's. Indicating a higher frequency of 1, 2, 3 and 5 occurrences. If that's true that is definitely interesting.

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•