Dice Roller 3000

By treybert, in X-Wing

This question has been bugging me for ages: are the dice really fair? So I set out on a method to roll each die several thousand times. The end result is the Dice Roller 3000.

MZh00n8.jpg

I'm using Lego mindstorms to roll a single die. It then presses my keyboard to trigger the webcam to take a pic.

The 2 motions on the cup motion have a randomized speed. There is a cross beam which also acts as the pivot point in which the die will hit when leaving and entering the neck of the bottle. This is to ensure some level of randomness.

The software I'm using is Adaptive Vision Studio Lite. It's a nice free option and quite powerful. The lite version is limited to 30 minutes program run time, so I do all the processing after the fact. The blue box in the lower left is actually checking for 'rectangularity'. If done right, the die should always reveal a triangle face. On very rare occurrences, I noticed the die was either still bouncing when the camera clicked, or somehow magically landed resting on an edge. In either case, the overall shape turns more rectangley which is easy to check for.

From there, I get a big text file with evade, blank, focus, or error. I throw out the errors, and perform a Chi-square test.

Here are the results so far:

Observed / Expected / Difference

Green01

-----------------------

Evade : 2120 / 2111.625 / 0%
Focus : 1371 / 1407.75 / -3%
Blank : 2140 / 2111.625 / 1%
Total: 5631

P value: 0.50 - fair

Green02

-----------------------

Evade : 2283 / 2301.4 / -1%

Focus : 1550 / 1534.3 / 1%

Blank : 2304 / 2301.4 / 0%

Total: 6137

P value: 0.86 - fair

Green03

-----------------------

Evade : 2583 / 2593.1 / 0%
Focus : 1712 / 1728.8 / -1%
Blank : 2620 / 2593.1 / 0%
Total: 6915
P value: 0.78 - fair

Green04
-----------------------
Evade : 2060 / 1985.6 / 4%
Focus : 1326 / 1323.8 / 0%
Blank : 1909 / 1985.6 / -4%
Total: 5295
P value: 0.057 - unfair

Green05
-----------------------
Evade : 3584 / 3532.5 / 1%
Focus : 2353 / 2355 / 0%
Blank : 3483 / 3532.5 / -1%
Total: 9420
P value: 0.49 - fair

Green06

Evade: 4341 / 4446 / -2%
Focus: 2960 / 2964 / 0%
Blank: 4555 / 4446 / 2%
Total: 11856
P-Value: 0.08

KTreu42's Deformed Die (see page 3)

-----------------------
Evade : 5556 / 5553 / 0.05%
Focus : 3715 / 3702 / 0.34%
Blank : 5538 / 5553 / -0.28%
Total: 14809
P value: 0.957 - fair

Any P value below 0.05 would be considered significant, meaning the die is most likely unfair. Thus any value above 0.05 is considered fair.

Results as I get them.

-edit-

Also, I made some corrections to die 1 and 2. I wrote another script to sort all the blanks, evades, and focus results into their own folders. Then I was able to manually adjust the false identifications quickly. That turns green01 to 0.5, instead of 0.18.

The Blank classification was the default. That and I was having some problems with my rig. Now that I'm sorting though, the results are significantly more accurate.

Green04 added. While technically not below .05, i think based on the other results, we can conclude this one is definitely not balanced. But I'm labeling each die for further testing

Edited by treybert

this is cool

Is there anything Lego can't do?

Also interesting results good stuff.

That's good for your 12 dice, but we need to get you 30 packs from various parts of the country, to do 1 die per type per pack- just to see how the dice do as a rule. ;)

Awesome. Can't wait to see how this goes

Very cool. Would love to see this done with the app as well. Then compare. Then see how many licks to get to the center of a tootsie pop. Go lego!

A lot of work and thought went into this, and that's awesome in and of itself. Nice job!

Also you need to vary your landing surface and roll distance.

Very cool. Would love to see this done with the app as well. Then compare.

Hmmmmm interesting. I think it can be done fairly easy, would just need to research how to fake the touch screen. Could screen cast it direct to the pc and skip the webcam.

Yes for every 100 rolls I make at least 11 end up on the floor and 3 get thrown at my opponent! :P

Also you need to vary your landing surface and roll distance.

I was thinking I might have to, but based on the results from the first die, I think I'm getting a fairly accurate result.

But d8's inherently don't roll very well, so rolling dice on a board that are full of ships may actually lead them to not randomize as much and possibly get influenced more from the die's imbalance. I don't know, that's just conjecture. But it has crossed my mind, so I may devise another simulator after this round to simulate a throwing roll.

someone needs to get this die some translucent dies as well cause i swear those are weighted lol

someone needs to get this die some translucent dies as well cause i swear those are weighted lol

on the contrary for me. i've found my translucent's to be rolling a lot more average than my original set. Especially on the green dice side of things

but i like them too much to go back

and i have a reputation out my area to be known as some kind of green dice throwing monster due to evading everything my opponents throw at me. lol

Edited by executor

i've found my translucent's to be rolling a lot more average than my original set. Especially on the green dice side of things

Without quantifying your claim and providing empirical evidence, selective memory (or any number of things) could be a factor in why you believe that. That's why the OP's scientific approach is useful, and claims such as yours aren't.

Edited by DagobahDave

What is random

Starts to sound like quantum probability calculations.

is it just me or is anyone else not surprised the result that out-performs it's expected value the most is the... blank...!!! :P

On a serious note-excellent project man-keep us updated...

Also you need to vary your landing surface and roll distance.

I was thinking I might have to, but based on the results from the first die, I think I'm getting a fairly accurate result.

But d8's inherently don't roll very well, so rolling dice on a board that are full of ships may actually lead them to not randomize as much and possibly get influenced more from the die's imbalance. I don't know, that's just conjecture. But it has crossed my mind, so I may devise another simulator after this round to simulate a throwing roll.

Assuming your results are accurate because they are what you expected?

FOR SHAME!!!

This is why people call us geeks.

This is why people call us geeks.

Yeah but being a big meat head is no longer something to be proud of is it :)

Society has progressed to the point it realises smart people are to be looked up to not scorned for being book worms, because it's smart people that make their lives easier longer and in general better.

Green02 (observed / expected)
-----------------------
Evade : 2282 / 2305.5
Focus : 1550 / 1537
Blank : 2316 / 2305.5
Total: 6148 (30 errors)
P value: 0.81 - fair

Time to geek it up. I work in a field where we use statistics often and Green01's value is actually quite interesting. Just because something may be statistically insignificant does not mean that its effect is insignificant in game. A P value of 0.18 means that there is a 0.18 out of 1 chance that the observed values happened out of chance. If you think of it that way, Green01 really may not be that fair compared to Green02. A better way to look at this would be to check out the percentages too.

Thanks for doing this though! It's really awesome to see stuff like this.

Edited by Broman811

I don't know about you guys, but next tourney I won't accept any dice that haven't been Certified for Fairness by treybert !

qbIEFmC.png

Hmm now there's a small business that's sure to get a loan.