Experimental Study of 29 Polyhedral Dice Using Rolling Machine, OpenCV Analysis (markfickett.com)
enFi writes: All dice are slightly unfair; automating 3k rolls x 29 dice allows detailed exploration. For example: GameScience claims their d20s are fairest, and actually has the fairest die in the study. Chessex d20s are consistently mid-range and all favor the same numbers; Wiz Dice d20s are highly variable (some rival GameScience). Shape differences measurable with calipers account for some of the larger observed differences, but not everything. Read the details for graphs, a video of the Arduino-powered rolling machine, and an explanation of using OpenCV to sort die rolls.
(Disclaimer: I'm the author.)
(Disclaimer: I'm the author.)
Finally, news for nerds, stuff that matters to kill some goddamn bugbears.
Nice try, DICE inc, trying to persuade us with your subliminal, liminal and even superliminal messages!
>> All dice are slightly unfair
No shit. This is why we all have our "lucky" D20s. (Or my favorite handful of "deadly D6s" to deal with up-ity PCs.)
You ran a dice experiment to get Dice (Slashdot) to report your findings.
Well done!
Disclaimer: I'm the commenter.
Haven't we had enough yet?
Back in 1987 I had just purchased my Casio FX-7000G scientific calculator. I read the whole manual, and made program that output a random number 1d20 number and a 1d6 (sword) number with the touch of a button. My fellow D&Ders were reluctant to let me use it for the game, but I assured them, that it was OK. After a few rounds of poor throws, they seemed OK with it. But as the evening went on all my throws were poor. I kept having to run from monsters.
The next day I made a plot of the numbers from the calculator's uniform random number generator. They were not even close to uniform! The histogram showed many more small numbers than large ones! POS!
And that is how I discovered a poor RNG in my calculator using D&D.
Since the randomness or "fairness" of dice is completely dependent on how accurately they're made and balanced, which is pretty hard to do for a manufactured product (there's always a slight bit of variation), wouldn't it make more sense to just dump dice altogether, and use a computer? You could even have an Arduino or other microcontroller-powered handheld device, using a random number generator to "roll" a number when a button is pressed.
I don't remember, how do you shoot 1-100? I think it's with D20s.
Can we please stop using physical dice now? Derp de derp
unless you somehow find a source for casino grade dice (and do they make casino dice in !D6??)
here is a trick
1 get a bucket and fill it with water (optional step have your local rabbi/priest bless the water)
2 drop a die in and roll it around for a bit keeping track of which number shows on top and then repeat as needed
3 Dice that roll a bunch of high end rolls are "blessed" and of course low end rolls are "cursed" dice
4 Sort as required
5 Profit!
I don't remember, how do you shoot 1-100? I think it's with D20s.
d10s. Pick one to be the tens place, other to be the ones place.
00 is 100.
Geesh people, I click on the story to find out which die rolls the most 20s. Lead with that! I want to crit dragons, and I want pictures of spiderman!
my TI-58C I bought in 1979 even mentioned in manual the random number function really was just pseudo-random
>> Can we please stop using physical dice now?
Not a chance. I play with developers...
3000 rolls isn't anywhere near enough.
Two: All gamers, apparently, go through a phase where they blame their dice for things not going their way. Get over it.
Three: This is why there are so many gamers that have boxes full of dice; they haven't got over it yet.
Four: Still insist on 'physical' dice hamstringing you? Fine. Write a smartphone app that uses the Quantum Random Bit Generator free service. If that isn't random enough for you, then you need psychiatric help, you're way too in denial to be healthy.
Are YOU using the TOOL, or is the TOOL using YOU? Think about it!
See the comment directly above yours, http://science.slashdot.org/co...
Computers are actually -less- random that things like dice. To get a really good random number into a computer, one often connects it to some physical process. A camera pointed at a lava lamp is a well-known illustrative example. Computers are, at their heart, calculators, everything they do is reduced to simple math. And 1 + 1 always equals 2, every single time; there's nothing random about what a computer does. That's why when generating crypto keys it asks you to type on the keyboard and move the mouse - because the user can make random movements. The computer can't do random.
Further, you can inspect my dice, how do you inspect my rPi and know I haven't coded it to roll 8 more often than it should? You can look at -some- source code, but how do you know that's the source of the program I'm running? Confirming that is much more difficult than looking at a pair of dice.
All computers of that day had pseudo-random generators. Even today, the vast majority of random number generators are pseudo-random, unless they're using external entropy from the network, mouse, or even a specialized entropy generator and these are only really used for encryption. Pseudo-random doesn't mean bad, it just means that the numbers are being generated from an algorithm and not some truly random source.
Mad Software: Rantings on Developing So
It's should still be possible to produce a flattish distribution with a decent pseudo-random generator.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Anyone joining my RPG groups needs a full statistical analysis on all of their dice, signed in triplicate, available at any time. We don't want another incident
Random.org. Case Closed.
...gis sdrawkcab (usually not responding to ACs; don't bother posting as AC)
Come on 7 or 11
No one will stop using physical dice. That's absurd.
Not just possible but pretty much required for the task. Obviously the calculator was poor.
The best random distribution I got was by taking the modulus of a hash of a GUID generated by .NET. Over the course of a million d20 rolls it came damn near close to perfectly even distribution.
I mean, honestly....if we randomly selected 2 Americans to server as President and VP, we couldn't do much worse than present options.
I think the number of rolls were totally adequate, but the number of dice involved. I would want a 100 of each dice from each manufacturer. Each pulled from separate stores and production runs before I would argue one brand is better than another.
Set the camera to take a picture every 4 seconds.
Instead of a tech-related roller, affix the can to a non-radial disc (i.e. a disc which has a small flat spot)
When the attached arm rotates the disc and reaches the flat spot, it will remain upright long enough for the camera to take a picture. The arm then pushes the disc over to tumble the die then brings it back up for the next picture.
Think of the arms of a steam locomotive and how they are used to rotate the wheels of a train.
We will bankrupt ourselves in the vain search for absolute security. -- Dwight D. Eisenhower
The best random distribution I got was by taking the modulus of a hash of a GUID generated by .NET. Over the course of a million d20 rolls it came damn near close to perfectly even distribution.
A "perfectly even distribution" has nothing to do with randomness.
"n = ( n + 1 ) % 20" will produce a "perfectly even distribution", but it's nowhere near random.
Graphs are great, but I don't want to look at 20 of them, and they're hard to compare with each other. Just give me a single number for each die, indicating how far it was from ideal.
My favorite way to do this would be to measure the dice in terms of bits of information. If you have a perfectly random die with 20 faces, it requires log2(20)=4.3 bits on average to specify which face was rolled. But if the die is nonrandom, it takes fewer bits to specify its rolls! In the extreme case a die that always rolls 1 (I've had some of these), it doesn't take any bits at all.
The way to calculate the number of bits of randomness in a die is to add up, for each face, probability(that face) * log2(1/probability(that face)). This can also be called the "information entropy" of the die.
Ah, maybe that's why my games were taking so long. I was rolling 100 D1s.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
>> I was rolling 100 D1s.
It might also explain why 99% of your results are between 37 and 63.
Dice-O-Matic wins this one.
And, besides, 3000 rolls is way to few to get usefull statistics.
We suffer more in our imagination than in reality. - Seneca
I see a business opportunity for someone to offer a certification service for dice. And for an additional fee dice could be "shaved" to balanced them correctly to meet some optimum randomness. And for a larger fee, they could be shaved to unbalance and provide specific rolls more often than random.
Any idea how little time it takes to implement software to simulate a dice roll?
I've abandoned my search for truth; now I'm just looking for some useful delusions.
That does explain a lot... as a D1 only has one surface it would have to be spherical; aka... a marble. Those *would* take a while to stop rolling around.
But I have ask why bother... the result is always going to be '100' anyway... unless you lose some of the marbles into the furnace vent or something?
The author has very poor statistical understanding here. You don't generally use expected value as a measure of statistical randomness.
You can use expected value to ensure that your dice are giving a fair amount of damage every turn, but it's not useful for much else, and good grief look at these plots: The very first plot on the page has a bar plot for standard deviation, and a CONNECTED LINE PLOT for expected value, even though adjacent data points have no correlation with each other!
If you're going to connect points together, the slope of that line has to be meaningful in some way.
Hasn't the author ever heard of a box plot?
The author also needs better measures of statistical randomness. Average/expected value is NOT a measure of randomness; a simple such measure would use the frequency between appearances of a certain value. For instance, find the distance between all the "1" rolls, and diff that distribution against the distribution of a truly random distribution. Do this for all the numbers through 20, then find the standard variation of standard variations.
So for instance with a d4, if I always get:
1 2 3 4 1 2 3 4 1 2 3 4...
The expected value (2.5) and standard deviation (2.23...) measures are exactly correct, but it has no randomness! The distance between 1s will always be 4. The distance between appearances SHOULD have a geometric distribution (iirc).
In 4000 rolls, I would expect 1s to appear back-to-back 250 times, a distance of 2 about 190 times, a distance of 3 about 140 times, and so on.
Since the actual series always has a distance of 4 with 1000 times, this means our standard deviation is... 959. 95.9%.
Now do this for all the numbers. I think you can average those together and get a final "randomness" result.
And this is just one test of statistical randomness! Cryptographically secure random number generators, by definition, pass ALL tests of randomness, i.e. they're indistinguishable from a true random number generator if you don't have the secret key/internal state (or enough computing power).
Wonder what the public key field is for?
There were d100s made, and they were almost round and too difficult to use practically.
Dice-O-Matic wins this one.
Looks fun and all, but I don't see how'd be able to get statistics on just one die with it.
systemd is Roko's Basilisk.
http://www.markfickett.com/stu... is the summary chart, showing the standard deviations of the d20s by brand/model.
(Lower is better)
By that review:
Crystal Castle the worst
Wiz dice next-worst
Koplow and Chessex about the same, with Koplow averaging slightly better, but one of the five Chessex dice was substantially better than all the Koplows
Gamescience clearly "wins", averaging below 0.1. This is better than ALL the other dice, and all 3 GS dice were individually better than all other dice, aside from the one Chessex exceptionally good die (which still wasn't as good as the best GS die).
-Styopa
Back in 1987 I had just purchased my Casio FX-7000G scientific calculator. I read the whole manual, and made program that output a random number 1d20 number and a 1d6 (sword) number with the touch of a button. My fellow D&Ders were reluctant to let me use it for the game, but I assured them, that it was OK. After a few rounds of poor throws, they seemed OK with it. But as the evening went on all my throws were poor. I kept having to run from monsters. The next day I made a plot of the numbers from the calculator's uniform random number generator. They were not even close to uniform! The histogram showed many more small numbers than large ones! POS! And that is how I discovered a poor RNG in my calculator using D&D.
I had an idiot of a stats teacher in college. Wanted us all to use Ti-83 calculators and then taught calculator statistics instead of trying to actually teach us how everything worked properly. Anyway, she would make everyone follow along with her on the calculator in class. Eventually all of our random number generators would be seeded identically and you would get the same 'random' number on every single one. I tried to explain to her what was going on - something any good computer science student would do. But she insisted that what I was saying was completely untrue and that it was just random dumb luck that an entire class of 30 students would get the exact same number over and over and over. This teacher was obviously a peerless statistician. (eyeroll)
I remember, back when I was taking a quick basic class (LOL!), that I noticed an anomaly in how the random number generator produces numbers.
Specifically (well, as specifically as I can recall without digging out old source code) I noted that the output of the RNG favored multiples of 4, after having some "Difficulties" with random numbers not being random enough in one of my programs.
I wanted to test that notion, so I created a small program that "should" have painted the screen with random colored fuzz, using a random walk. (EG, the X coord, the Y coord, and the color value are all based on "random" picks from the RNG)
Imagine how much I laughed when I saw a diagonal banding pattern appear instead of random fuzz, out of the random walk.
computed random sources: Random enough for some applications, but caveat emptor!
Heretic.
All dice are slightly unfair; automating 3k rolls x 29 dice allows detailed exploration ...
(Disclaimer: I'm the author.)
The slashdot summary is not the abstract of a paper.
Just because it's the norm for abstracts to be extremely unreadable to pack them full of information doesn't mean you should start a summary like that. That's horrible to read. Please use actual English for normal humans.
Wizards of the Coast has been distributing 20 sided counters that are shaped just like D20s. Only with out any sort of randomness. The next number up or down is adjacent to whatever number you're looking at. Hence, "Spin down".
Any chance of anyone running a statistical analysis on these?
Non impediti ratione cogitationus.
I really want to build a d6 tester, now. Once while working at a tabletop-game-related company I decided to test out the randomness of my Chessex d6 batches, and I swear my red d6es averaged something like 3.7 or 3.8 over several hundred rolls...but I was rolling a whole box worth at once (like 36), and that's still a pretty small sample size.
I posted this on his website, but here goes:
****
This is truly fascinating. However, I have a question for you. I'm wondering if you can extend your tests further to a specific type of d20 die. The game "Magic the Gathering" often makes use of d20 "spindown" dice, which are dice with the numbers going sequentially from 20 to 1. This is because these dice are used as life counters in the game (in addition for rolling for random things), and it's easier to change your life from, say, 20 to 17 if you only have to slightly adjust the die, rather than continually looking for the number on the die because it's placed (seemingly) randomly.
I once encountered a person who said he did not want to roll a spindown die to determine who would go first in the game, because he thought they were unfair. His logic, which I thought ridiculous at the time, was that dice with a greater concentration of double digit numbers on the top of the dice (i.e, 16-17-18-19-20) would be unfair, because slightly more plastic from the die had been removed to deboss (rather than emboss) those numbers onto the die, as opposed to the amount of material that had been removed to deboss the single digit numbers on the opposite side of the die (1-2-3-4-5). Thus, because there was slightly more plastic on the side of the die with single digits, the die would be ever so slightly weighted in favor of higher numbers appearing on the top. As a result, this person didn't want to roll a "random" die against a "spindown" die.
This seems somewhat ludicrous to me, because even if it's true it's probably such a slight difference as to have virtually no effect in most rolls. However, the fact that you have this machine set up means you can test this for the entire MTG community. Please do so, for SCIENCE! Go down to your local comic book store, and ask them if they have any Magic the Gathering spindown dice available. Then, please test away, and report back! People on this website would be eager to know: http://www.mtgsalvation.com/
For extra credit, you may note that the MTG spindown dice don't have a 20 on top. They have the symbol of the set from when the dice was printed; currently it's "Rise of the Eldrazi" but the spindown dice have had symbols printed on them going back ten years I think. So if you are able to get ahold of multiple spindown dice from different sets and if you can test them, the entire MTG community will know specifically which spindown die from which set is the most unfair! That is, if any of them are unfair. Thanks!
The Commodore 64 (from 1983) had an audio chip (SID chip) which had an analogue white noise generator that you could get random values from.
I had a spherical D6 once. It had internal recessions with a tumbling weight in it that made it stop pretty quickly and at a distinct number.
no, it's super-fast, because you know the result before even rolling... It's either 0 or 100 every time.
Sleep your way to a whiter smile...date a dentist!
You should have tested the distribution with a $\chi^2$ test.
But did you use the randomize timer statement in your program? If I remember correctly this was necessary to seed the random number generator if you wanted to avoid completely predicatble results.
A truly random sequence can contain several million ones in a row.
Typically you don't want true RNG for virtual dice, you want a somewhat even distribution.
This looks like a job for LEGO MINDSTORMS!
Since I first ran some games at conventions for him back in the 80s!
Dice have always been a passion for him.
She was like chocolate when she drank... semi-sweet at first and then increasingly bitter.
Yes I did.
The issue was with sequential values. I would have to reinitialize the RNG on EVERY pick, and wait a whole timer tick between iterations to get values that did not suffer this problem.
>> I was rolling 100 D1s.
It might also explain why 99% of your results are between 37 and 63.
Don't worry. That's completely normal.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
Go back to WOW, scrub.
You should have tested the distribution with a $\chi^2$ test.
Bzzt! You fail the "I know how to test for randomness" test.
Chi square TOR is a bias test and only a bias test.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
It's kinda entertaining.
you make up a strong brine. You put the dice into the brine. with a few taps you can tell if a dice is strongly unfair because it will keep floating back to the same number or edge when tapped down into the water.
Plus it makes cool salt crystals as it dries.
I have an unfair d20. But it's odd. On multiple occasions it's rolled four 20's in a roll. Very improbably. Yet some evening's it rolls no 20s. When I salt test it, it consistently floats to the edge between 10 and 12 so it's definitely unfair but it's still streaky.
She was like chocolate when she drank... semi-sweet at first and then increasingly bitter.
They now exist as a clear d10 with another clear d10 actually inside the first one; the outer one is 10s and the inner one is single digits.
Yes these exist; I have one.
How many rolls did it take before your machine inadvertently summoned Satan, who forced you to strangle your neighbours?
Perfectly even distribution is one factor. However, a more important factor was that you had improbable streaks that fit with the statistical model.
If you ask a human to simulate flipping a coin a hundred times, their biggest problem is not distribution but the inability to put in a streaks of 7 or more of the same face.
The one time I went to vegas to try gambling, the roulette wheel got 13 reds in a row. By the time it finally spun black, there was a large crowd observing it even tho it was a low stakes table ($1000 I think). I read later that statistically it happens multiple times a day in vegas every day.
She was like chocolate when she drank... semi-sweet at first and then increasingly bitter.
That does explain a lot... as a D1 only has one surface it would have to be spherical
I have a d1 in my dice bag! It's a "1" pool ball from one of those miniature pool sets - just the right size.
Socialism: a lie told by totalitarians and believed by fools.
All computers of THIS day have pseudo-random generators.
I wish. I have 16 D20s and no matter which I roll, I consistently roll more 1s on them than 20s by a long shot. Last gaming session (playing Dungeon Crawl Classics) I rolled 8 1s, 4 2s, and 20 total rolls under 10 (of 22 rolls). Four of those 1s were sequential (rolling a different die for the last 2). Thankfully my percentage dice were hot and other players picked up the slack. Not that I do much damage anyway (D6 with bow, 1d6-2 with sword - I'm a thief with a 5 strength).
In the session before that (playing a different game that is a first edition D&D clone, but I don't remember the name - I think maybe Castles and Crusades; our DM was hunting deer last session, so we played DCC) I actually tossed all the D20s to see which one to use and came up with no roll over 10 and four 1s. I swear they're effing cursed dice. I have better luck with a D6 and D10 than an actual D20. In that game I'm the cleric and have had horrible D8 rolls, as well. Cure Light Wounds... 1 point. Cure Light Wounds... 1 point. Cure Serious Wounds... 4 points (yay, I got a 2 on one of the dice!!! - and yes, in this game it is a flat roll, you don't add a point for every level). That cleric is also inept in combat, but I'm so heavily armored most monsters need an 18+ to hit me if they're the same level as us. I usually draw the majority of attackers and rarely take much damage. The half-orc barbarian is the one I usually patch up - he dishes out massive damage, but takes it too. We've been highly reliant on potions.
Shouldn't that be: "YOU DICE-ROLLING COWS!"
The troll needs to up is game.
Second class citizen of the New Gilded Age
I wonder if any of the natural bias of a particular set of dice could be reduced through the use of something like a dice tower which contains internal facets that cause the dice to tumble more and possibly have less unhindered spinning time to settle into their more natural configurations.
"I opened my eyes, and everything went dark again"
The early PC BASICs all had flawed RNGs this way - every 8-bit system had some similar flaw IIRC. I remember the diagonal bands from the TRS-80. The C-64 had the ability for strong randomness, but it wasn't part of RND() (I'm pretty sure C-64 BASIC had the best of the 8-bit world though).
Very fast, lightweight, "good enough for a game" pseudo-randomness is really easy with a 32-bit system, but gets more complicated with smaller registers.
Socialism: a lie told by totalitarians and believed by fools.
Except by the DM in my last game. He loved his D100 and made us roll it for certain occasions. That one was very odd - hollow with a weighted ball inside. I don't remember if they were all like that or not.
"lucky" D2
What's that, a coin?
file:
Well, you know the possible results, but you sure don't know which it is before you roll.
Until you roll, it's both 0 and 100. It's Schroedinger's dice.
Lost at C:>. Found at C.
I don't believe your story. It's completely trivial to make uniform pseudorandom numbers: 01010101010101010101. The trick is getting them to be independent, which the previous sequence isn't. So one usually detects poor pseudorandom number generators by finding some correlation in them, like with RANDU.
entropy happens
Which would make it a problem still present today on many small, dedicated devices that intend to be dice-roller substitutes. (They would tend to be based on very cheap, simplistic processors, like a z80, which does not have very big registers at all-- This would be because a z80 clone costs a few cents, where a 32bit SoC costs significantly more-- a buck or more per chip, and often comes with an NDA.)
A dedicated device should include a dedicated source of randomness. Circuitry to measure thermal noise from a reverse-biased zener diode is pretty cheap, so it's not like it would be prohibitive. Of course lazy designer might not bother.
White noise generators aren't analog, they're digital LFSR circuits. They produce a pseudo-random bitstream, but it's quite predictable.
For any solution where you only need to be fast enough to keep 1 user from thinking it's slow (you can take dozens of milliseconds, that's almost forever), you can do a good implementation even in 8 bits. Plus, as a sibling post pointed out, you can use a dedicated true random source (and LCG 32 plus an entropy source will be better than most physical dice). The early BASICs just didn't bother, plus the field has come a long way in 30 years.
Socialism: a lie told by totalitarians and believed by fools.
Your sitting in a stall at work, and u dump a load. U no its good when the pressure exerted to expel said dump, distorts your depth perception, and upon the exit, you shiver due to the 10deg drop in temp from the expulsion. 10 min later10lbs lighter and 10deg cooler., now that's a story worth reading, and or posting. Same equivalent value right??
I think e^{pi}-{pi} is the test you're looking for...
Nothing posted to
Go here, print out 1000 random numbers for each die, bring the list to game, cross them off as they are used....rig it so you don't peak ahead to rig if toward beneficial behaviors.... LOL
7 5 18 16 3 1 19 4 11 13 19 7 7 10 17 5 4 1 19 2 9 12 9 5 10 7 12 14 6 12 13 5 7 18 1 20 1 5 14 19
7 19 5 5 16 16 9 19 1 4 18 13 7 19 1 12 13 9 18 4 18 7 12 19 1 7 7 17 5 19 15 15 9 7 3 18 8 6 11 14
10 19 8 5 5 2 1 11 15 5 17 2 5 3 16 9 8 14 11 14 18 4 14 13 14 6 10 13 12 5 20 6 5 13 3 9 12 4 6 18
6 6 1 17 20 1 15 14 2 15 20 10 2 8 7 1 13 4 9 10 5 2 20 5 20 4 13 12 1 9 17 5 13 11 20 19 9 9 4 11
19 17 14 1 17 7 3 10 5 14 16 9 4 1 1 20 5 1 20 13 15 2 2 5 4 7 15 4 14 15 1 1 1 20 11 6 20 15 13 14
11 11 12 18 5 9 16 8 16 10 6 6 9 9 13 3 5 5 13 9 12 10 8 15 4 3 10 8 4 19 17 7 3 2 9 18 8 1 17 7
1 7 13 20 3 5 5 1 17 20 18 6 2 13 2 14 19 18 15 19 20 18 2 6 13 12 17 16 4 8 2 4 15 16 17 14 5 8 9 13
14 19 6 12 8 6 8 17 12 8 20 14 4 7 15 4 11 2 6 16 13 10 17 18 4 13 3 5 3 9 8 1 20 2 9 2 2 2 13 17
13 4 19 19 20 13 3 12 2 3 2 7 10 11 20 3 2 7 9 20 16 5 15 7 11 17 11 7 12 2 19 1 11 14 2 2 15 2 17 4
7 11 17 15 5 12 17 15 10 7 19 9 6 4 20 16 4 3 15 16 9 10 19 4 12 17 10 7 17 18 10 18 5 17 13 2 20 15 16 9
6 16 19 15 16 10 9 20 7 3 12 9 19 2 11 1 9 19 20 1 19 12 2 7 16 17 15 12 1 11 1 18 6 17 19 14 5 15 18 7
17 4 1 7 18 18 16 15 2 3 16 10 10 5 13 17 16 5 9 3 1 14 18 4 20 15 8 14 5 15 4 9 5 17 18 14 19 20 2 19
6 18 10 5 4 2 14 12 18 9 6 12 7 18 17 7 10 1 9 14 5 11 15 14 7 8 18 18 2 14 9 9 20 13 16 12 18 11 1 8
14 14 12 6 16 10 18 19 15 15 20 5 4 6 2 4 16 10 18 2 13 13 15 14 6 6 20 19 1 3 5 16 19 3 2 10 2 7 17 3
16 20 15 2 2 11 3 19 18 4 10 5 18 19 4 2 14 13 15 11 16 20 12 10 11 10 16 4 12 2 7 3 5 11 7 19 7 13 18 3
8 17 19 12 1 11 2 14 5 16 2 9 4 2 8 8 16 13 18 19 19 15 16 17 15 14 15 11 8 5 4 7 20 5 16 12 17 4 20 15
6 2 12 5 3 20 4 13 15 14 1 9 19 16 16 6 8 1 7 20 7 19 4 19 18 8 1 17 13 12 13 7 3 20 7 20 3 16 19 6
18 15 16 6 4 2 7 9 17 12 1 5 2 10 12 3 5 3 18 19 17 3 12 1 18
Really? I would have thought it would have been completely binomial and only somewhat normal.
Even when the experts all agree, they may well be mistaken. --- Bertrand Russell.
I remember, back when I was taking a quick basic class (LOL!), that I noticed an anomaly in how the random number generator produces numbers.
Specifically (well, as specifically as I can recall without digging out old source code) I noted that the output of the RNG favored multiples of 4, after having some "Difficulties" with random numbers not being random enough in one of my programs.
I wanted to test that notion, so I created a small program that "should" have painted the screen with random colored fuzz, using a random walk. (EG, the X coord, the Y coord, and the color value are all based on "random" picks from the RNG)
Imagine how much I laughed when I saw a diagonal banding pattern appear instead of random fuzz, out of the random walk.
computed random sources: Random enough for some applications, but caveat emptor!
Well, you could have read Knuth's Art of Computer Programming, vol 2 and learned a bit about the many possible flaws one can find in pseudo-RNGs, where clustering on hyperplanes at some dimensionality is one of the simplest. Or, you could use e.g. diehard or dieharder to test the RNG a bit more scientifically than with outputting a 2d screen of fuzz (which will work, but only for a really truly terrible generator). Nowadays, though, there are many very, very good pseudo-random number generators out there. Mersenne Twisters, for example, have correlations only in some gawdawful high dimensionality (over 600) so you Will Not See Bands in 2D fuzz. AES-based routines, or threefish based routines, will give you cryptographic quality RNGs (except for the bit about choosing the seeds, if you repurpose them as PRNGs). Variations of Marsaglia's KISS generator are Very Good Indeed.
You can get some of these in the Gnu Scientific Library or built into R. Any of these would be random enough for almost any purpose requiring random numbers, since so far it is pretty damn difficult to come up with a test for randomness that they fail, and any purpose for which they fail would in principle be a good test. If you find one, let me know and I'll stick it into dieharder.
rgb
Even when the experts all agree, they may well be mistaken. --- Bertrand Russell.
It's a C D1, it starts from 0.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Really? I would have thought it would have been completely binomial and only somewhat normal.
Normal is just the limit of binomial. 100 D1s is effectively infinite after enough drinks.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
I would have thought that 100% of his results would be 100.
That group of bovine standing over there appears quite portentous. That's right it's an ominous cow herd.
Come on, if you are doing a study of dice fairness, I expect better statistics. What is your statistical error? Do you just think that 8000 rolls is enough to pick out errors of this level, or do you have stats to back that up?
Wasn't there a web-based random number generator that used space or cosmic noise as its source?
From my understanding, typically when you get random noise from the environment, you aren't exactly sampling the -actual- stuff -- there may not be any sounds, for example. Quiet rooms are not unusual. What you do is what an anonymous coward mentioned - you have a sensor that reads the temperature as 72.7230283037 degrees F. It's not REALLY that accurate, the last few digits are basically random. Maybe the light sensor says 43.584723028 lux, plus or minus 3 lux. It has more -precision- than it has -accuracy-. The decimal part is bullshit, random.
Obviously the device has to convert the analog measurement into a digital number that the CPU can manipulate. It uses an analog-to-digital converter to do this. A typical ADC might convert the reading from a microphone into an 8-bit integer, ranging from 0 (approximately silent) to 255 (very loud). A 16-bit ADC gives a range from 0-65,535. Phone calls traditionally use an 8-bit ADC because that's sufficient for voice. Voice calls don't have to be hi-fi, especially after you remove the highest and lowest frequencies which actually hinder intelligibility.
It would be wasteful for the manufacturer to use a 24-bit ADC on the microphone if they're only going to use 8 bit samples for phone calls, so they may only use an 8-bit ADC. In that case, the range of loudness is only 0-255, with no decimals, meaning any quiet room will register 0. There are no extra extra digits with "random" values. If the manufacturer intended to use it as a source of randomness they could use a 24-bit or 32-bit ADC, knowing that the smallest bits will be roughly random.
I remember using one, and you'd have to roll it in a container so that it would actually stop at some point.
More subtle was using a specific seed in a calculator RNG to generate a certain sequence of rolls. A friend tried this during character generation. I knew about seeds so I said sure, but we'll flip a coin each time. If it's heads, we'll take the 2d6 roll the calculator shows (this was Traveller where stats were 2d6). If it's tails, we'll use 14-2d6. He must've decided it was better to have an average character than one half of whose stats sucked, because he quietly said he'd use regular dice.
I don't know who you are but you're dead to me AC, dead to me!
"So long and thanks for all the fish."
You are an adult. Go buy more. I had (have?) a friend who'd go into the shop and sit there, for a very long time, rolling individuals until he found the exact ones he wanted to purchase. It was mildly annoying and amusing at the same time.
"So long and thanks for all the fish."
I highlighted your comment, from web-based to cosmic noise" and right clicked on it. I then selected search and followed the very first link at Google. I think figured I'd find out if it was what you spoke of and search to see if they had a way to grab it by bash or Python from the terminal but, I digress.
Is this the service that you speak of?
https://www.random.org/history...
"So long and thanks for all the fish."
See also the Martingale betting system. It's a *bad* idea. I've heard tales of the RNG at KOL throwing 23 losses in a row. I'm pretty sure the "victim" was crying in real life. She went from one of the wealthiest folks, in the game, to being poor as dirt. Money is meat in KOL so she had no meat left to speak of as she'd let a bot run her betting for her overnight while failing to set the bot to stop after a few tries. I did not check the math to see how much, exactly, 23 results in but I think she had pretty close to maximum meat the night before. She was devastated.
"So long and thanks for all the fish."
Woah, that's great!
It looks like it takes more infrastructure than my setup, though. :)
If you want to join the thread above about number of rolls, I'd be curious to hear more of your thoughts.
Are you positive about the TRS-80? I thought it capable of strong randomness but, well, let's just say that this was a long time ago. I may be recalling a chip one could put in that was an RNG? It has been a long time. I think the TRS-80 might have also been the system that required adding a chip, increasing bits, so that one could actually type in lowercase letters. But, as I said, it was a long time ago and I've done some stupid things to my thinking organ in the interim.
Perhaps...
X = RND(1)
Which was, of course, predictable. But...
Y = RND(1)
X = RND(Y)
Which was considered strong randomness, at the time, but - unfortunately, my memory isn't that good. I also seem to recall that one could make loops of this and increase the randomness. I'm *almost* positive that this was true but it may have had to be implemented a bit differently. FOR Y = RAN(1) AND Z = RAN(1) then average and maybe use more than Y and Z in a loop and then use that to get your random value.
Of course, on a theoretical level, I'm not entirely certain we can ever truly accomplish random. I'm trying to recall all of Bernoulli's (no, not that guy, I'm a mathematician - not a physicist) Theorem or the Golden Theorem but I think I'm conflating it with the LLN. (It has been a very long time.) At any rate, we're not going to get true random - I don't think. If we do develop it then, frankly, I suspect that we're simply not seeing a large enough picture to make that claim and don't know how to look at it. I.e. at best, I don't think we'll ever truly have a law or the likes. Conceptually, it is nice but given that there's probably nothing that's truly random - in the entirety of the universe, I don't think we'll ever get anything above the theoretical level.
I could probably word that better and probably should but it'd take time, be ignored, and would be yet another of my novellas. Alas, I'm tired today. Let it be known that I am not a programmer. ;-) I have, however, done a lot of programming and I already apologized to those who had to fix it and work with it. Ten lines of uncommented code is better than three lines and clear comments, after all. Version control? That's for wimps! Push it to production! A cornucopia of drugs and alcohol were involved.
"So long and thanks for all the fish."
I don't think we've actually got a true random source - just stuff that appears to be true random until we've a greater understanding. I'd also not want to be the person trying to prove something was truly random. I'd say that's neigh on impossible. (For true, absolute, random.)
Also, concerning my above post, I should add to that there's also the time-frame to keep in mind. In other words, "strong randomness" for that time. The field has, as far as I know, improved a great deal in recent history and my last scholarly work was in the late 1980s or early 1990s. After that I needed only a subset and not true random as much as chaos is not, of course, random - it just appears to be until you're able to gather enough information and understand the causes.
I think people might be a good example. Nobody runs around a burning auditorium at random. It may appear so but they've a purpose and a reason. Sure, it's noisy but it is not random. World courts and the UN prohibit me from demonstrating this principle.
Err... I can probably show you the math but I don't think Slashdot supports the markdown/markup so trying to use language to make it easy to grasp isn't my strong suit. It doesn't help that I don't know your level of understanding but you mentioned "true random source" which makes me unsure of what to make for assumptions. Unless there's been a breakthrough, that I'm unaware of, such is impossible at this current time and, likely, forever. Do not confuse unpredictability with randomness - they are not the same and only look the same from someone who hasn't been able to see the problems inherent in the concept of random.
Unless you're a physicist, in which case, I respectfully disagree but that's a topic for another day. As a mathematician, and as an appeal to authority, I strongly submit that there's no true random. It's simply impossible and anything that seems like it is just means that our understanding of the physical is limiting and influencing our conclusions.
I haven't read this in its entirety (I just barely skimmed it) but, if you'll accept it, may give some insight.
Of course, there's practicality and quality. I'd certainly agree that, with varied degrees, we have some levels of unpredictability and those are applicable and of high enough quality that we can assume a random response that is "good enough."
I'd be *very* interested in reading your reply regardless of your scholarly achievements or whatnot. It's not just a nit to pick but an underlying concept that needs understanding if we're to go further in the field. I've tried to articulate this well enough and have re-written parts of it but I'll fill in any needed areas if you want. Again, I'm quite interested in a rebuttal or refutation as there may be something that's changed and I'm unaware of it.
I have not been nearly as productive as I could have been nor have I maintained my ties with academia at a professional level. I've always been fond of the concept and have some unfinished work that I should probably complete and publish before I get too old to remember but real life is often more amusing and I am as impacted by entropy as the rest of the universe.
Anyhow, even my email is available should we need to make use of it. I was, specifically, attempting to avoid a writing a novel but this missive is not too long. Articulation is not my strong suit.
"So long and thanks for all the fish."
Whoever did this experiment and presented the results is quite clearly a much better programmer than they are a statistician, because I have never seen the results of a statistical analysis presented in such a way.
Typically, charts for the sample proportion of observed frequencies, and their standard errors (not standard deviation) are plotted as points with error bars around them. It is also not difficult to go beyond descriptive statistics and perform a simple hypothesis test for whether a die is biased, or to calculate confidence intervals.
As the data are presented, it is really difficult to answer questions of the form, "to what extent is the variation observed in a given die's performance explained by random chance, and to what extent is it due to a physical bias in the die itself?" That is the crux of the matter and the proper context in which to frame the question that the experimenter seems to want to answer, which is, "which brand of die is/are the least biased?" You can't give a statistically meaningful answer to that question by merely calculating sample statistics.
I see. So alcohol is related to the issue of whether or not 3 colors in quantum chromodynamics is enough to be considered "infinite"? Or are you trying to say that alcohol is normal. If the latter, I'm willing to believe it, because a D1 (as I understand the "n" in Dn) is a one sided die, which is sort of like flipping a mobius strip as a one-sided coin, and if I try to visualize that I'm gonna need a drink to soften the headache. But the resulting distribution isn't very bi. Or normal.
Even when the experts all agree, they may well be mistaken. --- Bertrand Russell.
I see. So alcohol is related to the issue of whether or not 3 colors in quantum chromodynamics is enough to be considered "infinite"? Or are you trying to say that alcohol is normal. If the latter, I'm willing to believe it, because a D1 (as I understand the "n" in Dn) is a one sided die, which is sort of like flipping a mobius strip as a one-sided coin, and if I try to visualize that I'm gonna need a drink to soften the headache. But the resulting distribution isn't very bi. Or normal.
Of course. Just find a shop selling monopoles and they probably also sell D1s.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
The SID noise generator was a reverse biased diode + analog amplifier. And yes, shot noise *is* white.
And they're notoriously bad, especially since generally the outer die (the 10s) is the most biased.
> I'd also not want to be the person trying to prove something was truly random.
Correct me if I'm wrong but isn't the decay rate of a radioactive particle random ? There's an average between extremes which leads to half-life being calculable for large amounts but the specific moment at which one will decay is not predictable as far as I know. Wasn't that sort of Schroedinger's point ?
So one may conceive of a cat-scanner with a lump of subcritical uranium inside it, using the scanner to monitor the individual particle states and each time one decays you record the time from "started looking until decade" and use it as entropy.
Uranium acquisition is left as an exercise for the reader.
Unicode killed the ASCII-art *
About the camera shutter life, why not substitute a video camera? I realize it would require significant reprogramming to grab a frame from the feed rather than grab something that's all triggered by a picture camera (and many other differences such as resolution), but I think it would be doable to eliminate that cost. And I think one could find a video camera for around $100 (one of the small flip type ones) that does either 720p or 1080p.
Took me a while to parse that. :) // allocate a C D1 // how many elements are on it? // equals 1 // initialize
int D[1];
double elements_in_D1 = sizeof(D1faces)/sizeof(int);
for (int i = 0; i++; ielements_in_D1)
D[i] = i;
Even a C D1, which starts at zero, only has one face, valued at zero, so we don't need to roll it, since we know the outcome is zero. :p
way to go /. (And people wonder why I think python is stupid.)
int D[1];
int elements_in_D1 = sizeof(D1faces)/sizeof(int);
for (int i = 0; i++; i < elements_in_D1)
D[i] = i;
don't think we've actually got a true random source - just stuff that appears to be true random until we've a greater understanding.
That's a philosophical topic that, while interesting, isn't relevant. Diode thermal noise is unpredictable, and that's the important bit. Just as rolling a die: is it random? That's a topic for the ages. Is it unpredictable, with all the right statistical properties? Yup, for a fair die. That's the relevant test. If you can predict the output of any cryptographically secure RNG, there's a $1 billion prize waiting for you.
The predictability of other RNGs are well-studied, and well characterized. E.g., it's possible to predict the output of a LCG-based RNG, but it takes quite sophisticated software, and billions of sequential results (well, assuming we're not using 16-bit keys here). Add some physical entropy and it's secure enough unless $billions are on the line. Is it truly random? Who cares - it's better than physical dice.
On the philosophical question, quantum physics tells us that some things are unpredictable, and whether random or not, any observation we can possibly make can't distinguish the underlying state from random, making the philosophical question a bit of a moot point.
Socialism: a lie told by totalitarians and believed by fools.
Care to enlighten the class instead of just snark as to what is the difference and what test actually tests for randomness?
Sorry. I wasn't up to writing a book. But here's a summary of the top of my head..
There are simple statistics. Chi-Square, Mean, Serial Correlation etc. These are good to understand the effects of a physical system on reducing output data quality. E.G. feedback in an electrical entropy source circuit generally introduces serial correlation. P-N Transistor mismatch generally introduces bias. You want to know how much.
The are distinguishability tests (think NIST SP800-22 or dieharder). They test if data is statistically distinguishable from random. They give a yes/no answer with a P value for confidence which gets better with the amount of data. These are tests of algorithms. Not much use for testing the entropic quality of some system.
There are IID entropy metric tests. They give a quality result (usually in percent, or bits per bit of entropy). SP800-90B describes some of these tests. These tests are useless because there are no IID processes in this universe that are accessible to a computer.
There are non-IID min-entropy metrics. SP800-90 describes some of these. The Markov-Renye min-entropy test is the only useful one. It describes a lower bound for the min-entropy of the unprocessed output of an entropy source, assuming you aren't cheating by say running it though a DRBG. SP800-90B is still in draft, there will be a new class of tests in the next revision called predictor tests. I developed such a test years ago for our RNG called the j-tracker based on an optimal attack model. The new tests follow on from this basic idea. I'm sure everyone is waiting with baited breath to see how NIST formulate their predictor tests. These min-entropy tests are essential to tell you if you are meeting the input requirements of your entropy extractor algorithm.
In general, you don't test for randomness, you test to understand the entropic quality of your entropy source output data and show it meets the input requirements of the extractor. Rolling dice is analogous to a biased entropy source. It's likely to have a undetectable level of SCC and clealry has detectable bias. It's an easy source to extract cryptographically strong random numbers from. In fact I know of situations where root keys are created using dice in a closed room. It's a practical solution to keep raw keys off computers where they can be compromised.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
I'd babble about how the "highest" order of mathematics would be the Philosopher of Mathematics but I suspect you know that and it would be immaterial. ;-) Anyhow, yes, very much is it unpredictable and it's certainly adequate (probably exceeding needs) for the time being. It's just not true random - I'm pretty sure. It's one of those subjects that I find fascinating and have spent a bit of time on. I do know a little about quantum physics, not a great deal, but my understanding is that it is still quantum states may be true random, in as much as we can tell, but we're not quite sure how to go about proving this. Again, I've a very limited understanding of such.
"So long and thanks for all the fish."
Well, obviously PRNGs arn't random - that's why they're called psuedo-random. Whether stuff like radioactive decay is "true random" is, at best, an empirical question (not a philosophical one), and more likely a nonsense question. That happens a lot in QM: trying to reason in detail about phenomena at that scale in terms of stuff we're familiar with just can't work: the concepts just don't match up. For example, asking whether the position of an electron is actually random: the question makes a flawed assumption, as electrons aren't discrete objects with individual positions to begin with. As a loose analogy, sure, we can talk about particles with position, but if you ask any hard questions then you have to abandon the notion.
Socialism: a lie told by totalitarians and believed by fools.
That makes sense. I watch a bunch of talks and documentaries on quantum mechanics and physics but, honestly, I do so for entertainment and not as a scholarly pursuit. I pick up and retain some but that's incidental and not the goal, it's just entertaining and I like to learn a little and I never know what I'll learn. Some of them are things that I can watch multiple times. I've never really been a big fan of regular television, even as a child.
It wasn't until I got into the higher level maths that I began to realize how much the idea of 'true random' being tossed casually about tweaked me a little. At the time, I'd actually anticipated a career in academia as my future. In part, it was that curiosity that drove me to look into modeling traffic, a limited set of chaos with something that approached random and, lo and behold, it's not all that random at all and one can find order within if they look hard enough.
In reference to the latter portion of your post... I've found that some of the greatest advances have come from people asking "hard questions." That's something to mull on and I'm assuming we've similar definitions for "hard questions." Thanks! That'll keep me amused for hours. Sometimes, the most difficult thing to do is to figure out the appropriate questions.
"So long and thanks for all the fish."
We don't really know. What we do know is that it is unpredictable which is similar to random but not entirely the same. It may even be predictable and, likely, is at a certain time scale.
Keep in mind that I'm not a physicist, I'm a mathematician. I've found the concept of random fascinating since I got a good instructor in the some higher levels and they were able to really give good instruction as concepts as opposed to rote. It was actually what led to my thesis and then to modeling traffic - we only appear to do random things.
Anyhow, I am not sure if decay is random - probably not, entirely. We use some form of radioactive decay as a measurement so I am assuming it's predictable which is probably not always the same rate at the particle scale but it's probably not truly random. I'm not entirely sure how one would go about proving that it is random. That'd take some thought... It's also quite likely to be beyond my ability for I am not omnipotent. ;-)
"So long and thanks for all the fish."
Me as well, I call it the "dramatically slow rolling" die and only use it for such rolls.
It looks like it is random. For controlled conditions, there's no room for any hidden variables that would affect it. Einstein famously said "God does not play dice" but it looks like he does.
Now, it's possible that some new physics could open up that might show differently but there's no reason to expect it will.
If it at all interests you, I'd recommend looking a little closer at QM at the academic level. It's almost 100% mathematics.
I'll have to look into this. Thanks! Quite a bit of the work in QM (referencing your other comment as well) was long since my days in academia. I earned my PHD in the early 1990s and I was fortunate enough to go to MIT. This meant that I got to leech a bunch of knowledge from some very smart people. I still have some contacts and I may ask them if I they have some course work that they can share, if they mind me auditing a few courses, and whatnot.
A funny aside... I learned mathematics by rote but couldn't really think of anything else to major in except maybe electrical engineering. Which, for a short while, I did. At one point, I got a funny, older, professor who said just the right things and explained it conceptually. It took it from mechanics on a paper to something I could visualize in my head and, it turns out, I'm pretty good at it. Prior to that, I was good at retaining things long enough to test and that one little bit, that one little click, and it's like it all snapped into place. I've always been able to do some pretty decent maths in my head but I'd have trouble with proofs, for example. Yet, it clicked. I don't know how to articulate it well.
At any rate. I will be going back by that way in the spring and do have friends in the area as well as in the domain. I may well leech some more and see what I can learn now that I've scads of free time. Conceptually, I get the idea of QE (for example) but I've never taken the time to learn, review, or even try to grok the maths involved. I'd probably enjoy the work.
I'll give it some serious consideration, thanks.
"So long and thanks for all the fish."