Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 27, 2016, 12:25:46 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Dice analyzer machine project  (Read 7544 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,253
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dice analyzer machine project
« Reply #75 on: February 25, 2016, 01:45:49 AM »
As educational as this project was, it seems to me that my intention of building a standalone Raspberry Pi powered ART PROJECT may not come to fruition, just because of the sheer amount of additional work it would take to make a nice user-friendly GUI interface and how hard it would be to make the code truly reliable enough that you could drop in any die and have it analyzed, and due to the slow speed of the RPI version of the code.

So it may be that I need to find another RPI art project idea..

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,253
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dice analyzer machine project
« Reply #76 on: February 25, 2016, 03:46:10 AM »
5000+ Rolls of a D20:

Screenshot - 2_25_2016 , 3_45_37 AM.png

Looks like these discount bags-o-dice i bought leave something to be desired in terms of fairness!
« Last Edit: February 25, 2016, 04:02:39 AM by mouser »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,253
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dice analyzer machine project
« Reply #77 on: February 25, 2016, 03:58:43 AM »
ps. not enough data to make this useful but if you like pretty charts, here's the heatmap showing the die face transitions for those 5000 rolls:
Screenshot - 2_25_2016 , 3_57_40 AM.png

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,253
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dice analyzer machine project
« Reply #78 on: February 25, 2016, 09:42:52 AM »
I wanted to check if the initial biased results above indicating that some die faces are significantly less likely to be rolled, still hold up if the experiment is repeated -- or were just random spikes in the data.
As a nice demonstration of the power of statistics, here's a completely INDEPENDENT run of another 5900 rolls of this same die:

Screenshot - 2_25_2016 , 9_38_40 AM.png

Notice the same basic pattern as the first chart in terms of which die faces are more and less likely to come up.  Pretty darn cool.  :up: :up: :up:
« Last Edit: February 25, 2016, 09:58:24 AM by mouser »

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,267
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: Dice analyzer machine project
« Reply #79 on: February 25, 2016, 12:22:40 PM »

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 7,642
    • View Profile
    • The Blog of Deozaan
    • Read more about this member.
    • Donate to Member
Re: Dice analyzer machine project
« Reply #80 on: February 25, 2016, 03:28:55 PM »
Are the numbers in those statistics ordered? e.g., If it rolls a 19, is that a 19 on the chart? Or is it more like "recognized pattern number 19" (referred to as classes in this post)?

And finally, how do you eliminate the possibility that it's your rolling mechanism which is unfair?


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,253
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dice analyzer machine project
« Reply #81 on: February 25, 2016, 03:40:32 PM »
Quote
If it rolls a 19, is that a 19 on the chart?
yes, after the system creates its clusters automatically, i rename the clusters according to their die faces.

Quote
And finally, how do you eliminate the possibility that it's your rolling mechanism which is unfair?

This is somewhat of a philosophical question.

The only thing you can really say from these results is that the die rolling outcome results are biased.

However, what we can say is that there doesn't appear to be any clear pattern in terms of transitions in the heat map that would suggest that the die roller is doing weird things like flipping the die between alternate faces.
To help validate that the rolling procedure was as fair as possible you could try comparing results to different rolling mechanisms, or more practically, i could extend the rolling times to see if that made much of a difference.  Finding some high quality trusted fair dice that evaluated to fair using the system would give more confidence.

But to see why this has to be approached somewhat philosophically, just consider how physically the die might be biased -- it could be because of uneven weighting, or assymetric shape, or rounded vs sharp corners, etc.  And these will effect different "rolling" procedures differently.  So the way the bias will show up is dependent on the way in which the dice are "rolled" (randomized).  The best we can say is that when the die is rolled in this fashion, they exhibit this bias.  If you asked a human to roll the dice to test for bias, you would have the same problem -- the bias may show up differently based on whether the user "shakes" the dice in their hand and drops them to the table, or rolls them a far distance against a wall, etc.

If you really wanted to be more specific about bias of dice for human use, you could try to ascertain whether the biases found by one rolling machine matched the biases found by a certain human method of rolling dice.
« Last Edit: February 25, 2016, 08:53:15 PM by mouser »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,751
    • View Profile
    • Donate to Member
Re: Dice analyzer machine project
« Reply #82 on: February 25, 2016, 04:04:57 PM »
the camera on the Raspberry Pi, while high resolution, has absolutely no focus control and would not focus well on anything shorter than about 24 inches from it
This page on eLinux.org list a lot of (usb) cameras that are tested with the RPi, but I don't know if they are compatible with the python libraries you've used. Some of them will have better focus control, and you might even own one of them listed ;)
It's not going to enhance the (lack of) processing-speed of the RPi, though :huh:

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,267
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: Dice analyzer machine project
« Reply #83 on: February 28, 2016, 09:09:08 PM »
Thought you might find this interesting:

https://www.kickstar...agined/posts/1504651