So the talking D20 project https://learn.adafruit.com/talking-d20- ... gaming-die has been out for some time now and I'm sure more than a couple people have built it by now.
How are the stats on the rolls? does it favor certain numbers over others? or is it roughly balanced? if it's not balanced how have you corrected it?
talking D20 statistics
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: talking D20 statistics
I've not seen a writeup on the stats, but the code is using the Arduino random() function with a randomSeed(analogRead(0)). This means a free floating analog pin is the seed source. There are lot of other forums that get into the quality of these random numbers, but this is generally considered "pretty good" form.
code:
https://github.com/adafruit/Talking_D20 ... 20/d20.ino
discussion examples:
https://forum.arduino.cc/t/fixing-the-r ... ad/65726/7
https://forum.arduino.cc/t/randomseed-a ... 0/109478/2
code:
https://github.com/adafruit/Talking_D20 ... 20/d20.ino
discussion examples:
https://forum.arduino.cc/t/fixing-the-r ... ad/65726/7
https://forum.arduino.cc/t/randomseed-a ... 0/109478/2
- adafruit2
- Posts: 22144
- Joined: Fri Mar 11, 2005 7:36 pm
Re: talking D20 statistics
its totally not random because the die is not weight balanced. its meant to be a fun project, not a RNG!
Please be positive and constructive with your questions and comments.