Dice-O-Matic

[Scott] runs gamesbyemail.com. One of his biggest hurdles was producing real random numbers for the games. He had tried various methods like math.random and random.org, but kept getting complaints about the quality of the random numbers. His solution was to build an automatic dice roller. His initial attempts were made from Legos and were never quite reliable enough to be put into the system. The Dice-O-Matic however has proven to be a random number generating monster. It is 7 feet tall and capable of 1.3 million dice rolls per day. Wow.

[thanks Troy]

Comments

  1. BigD145 says:

    Any number generated by chipset will be biased. On the other hand, physical dice will also become biased through wear and tear. It’s still an awesome machine.

  2. Gene says:

    Ha! I have to imagine any good PRNG is plenty good for playing games, but the real problem was probably perceptual – i.e. a real series of random numbers will have sequences that people perceive to be non-random, and thus people will bitch about the PRNG. Being able to say “real dice are being rolled to generate the numbers” is a good PR move to deflect that since people identify randomness with dice.

  3. freeheel3r says:

    PokerStars actually have an in-depth explanation of how their (true) RNG works on their website – would’ve been less expensive and complicated imo

  4. Tim says:

    Yeah if people could easily tell a pseudo-random number generator from a real one then it wouldn’t be a very good PRNG!

    It’s definitely perceptual. Nice project though!

  5. SashaTheHippo says:

    I’ve always wanted to build such a machine, although my ideas were on a much smaller scale. Digital random-number generators can’t possibly be truly random, and have been tracked in the past to cheat at certain computerized casino games. I’m sure it’s gotten much more difficult to pull something like that off, but this provides a fool-proof solution. I like it

  6. Dave says:

    SashaTheHippo – look into a radioactive decay / lava lamp / noise from a digital camera solution, as far as anyone can tell these are truly random.

  7. Gene says:

    sashathehippo, I wouldn’t say this is fool-proof with respect to cheating. Cheating (or for that matter, breaking encryption) with PRNG has to do with finding bias; a perfect RNG will have no bias. Most common dice actually have a fair amount of bias due to the manufacturing process not producing uniform cubes, corners, and such. The dice used in Vegas casinos are very good, but also quite expensive for this reason.

  8. CDWatters says:

    Wonder if the software which is reading the dice is open source? That would be the basis for an nice dice-reader for low-vision players.

  9. DeFex says:

    Sampling an audio mic input with the mains / PSU frequency hum filtered out is a good random source.
    most computers would not even need any extra gear.

  10. DeFex says:

    Doesnt matter though, its an awesome machine :D

  11. zacdee316 says:

    Why not just build something like the lotto machines that are used to make a number. Jets of air pushing around balls and when you want a number, you open the valves and the balls would float up.

  12. Pedro says:

    DeFex, but not in a silent room! And there’s got to be some pattern to the hum of cooling fans in a datacentre. What about some sort of EM detector? Assuming your server isn’t in a Faraday cage, the random radio signals, OTA TV, WiFi, 3G etc signals must be pretty bloody random!

  13. nick says:

    super bad ass!!!!!!!

  14. idogis1 says:

    How random do you think radio static would be. I’ve thought about using a usb TV tuner set for an empty station and running the output through an equation as a way of generating random numbers.

  15. thethirdmoose says:

    Here’s what I would do:
    I would have a very fast astable oscillator and a RC circuit where the R is a thermistor with a high sensitivity situated anywhere. I would make the oscillator stop running when the capacitor has reached a certain charge. That would be truly random, because it would depend on tiny fluctuations in local temperature, which is random.

  16. sean says:

    wow…i really can’t think of anything to say anybody hasn’t, all i can say is wow lol

  17. hum4n says:

    When my friends say “look at this video, it’s so random” I can say “No, fuck you. This is truly the most random shit you’ve ever seen!”

  18. bort says:

    who the fuck is complaining about the quality of the random numbers?

  19. BigD145 says:

    Local temps are not random. They follow fairly specific curves.

  20. guy says:

    In college I built a random number generator which took a fm radio and tuned between stations (white noise) then took a sample of the noise with a DSP to provide the random number generator seed.

  21. Hirudinea says:

    ROLL DEM BONES!

  22. er says:

    Unless he’s using expensive dice and replacing them fairly often, all these people complaining about psuedo-RNGs may have just shot themselves in the foot.

  23. Louis II says:

    holy cow… omg awesome!
    This is very inspiring!

    Perhaps a smaller device which runs through any USB port to any OS, provided a driver; gamers around the globe might be excited about having one of these in their game rooms.

    Alternately, it could be used to set up a constant stream of numbers through a web interface, serving numbers as they are asked by a form that the user selects the number of roles through…. imagine this physical device serving as a net-served rand();… that would be sweet!

    Or cell phones could get the numbers in a text message.

  24. Nacho says:

    What about a server with a tiny-but-very-active radioactive source and a Geiger-Müller detector?…. It would be a good source of Gaussian-shaped distribution ;)…

  25. Douglas says:

    Why haven’t we seen this on XKCD?

  26. Mickey says:

    What I like about this – is that the devs can publish their random numbers – then we all have randomness at our fingertips.

    e.g. using dice (1:6) – if you want a random number between 1 and 36, simply sum the next 6 dice throws. For a number 1:108, take 9 values sequentially.

    good one!

  27. Tachikoma says:

    PN tunnel-junction noise. That’s pretty random and should be inexpensive to generate.

  28. Tib says:

    Wow guys nice ideas! Random number generation is a rather interesting challenge.

    BTW mickey, summing 6 dice would give you random number between *6* and 36

  29. Mickey says:

    sigh – I wrote a quick response – and blew it..
    easy to fix: n-5 = 1:31

  30. Tib says:

    I once had this kind of bug in a program and I can’t forget… :)

  31. deez says:

    mickey, no, you can’t do that. summing destroys data, making some of the results more probable than other ones.

    using the 6-36 case (1-31 works the same way, the -5 is just a distraction), you only have one way to make 6, and one way to make 36, but a lot of ways to make 18 (1,1,1,5,5,5 and 5,5,5,1,1,1 are different rolls but add to the same result). i haven’t tried calculating it, but i think you could multiply the previous roll by 6 and then add the current roll. this would be the equivalent of rolling 10-sided and filling a digit out with each roll.

    it would have to be tested and checked for distribution before use, though

  32. haltux says:

    This is a joke – but a good one. Useless but nice machine. I imagine that the main point of it is to entertain the web site users, or to make people talk about it.

    Generating good random numbers is not that much a problem, it has been widely investigated by crytologists: there exists robust and efficient algorithms.

    There also exist simple ways to get “real” random: recording white noise, taking least significant bits, for example.

  33. blue says:

    deez, you only need two dice to represent every number from 1 to 36 if you use each dice as one “bit” in a base-6 number system. So just let (1,1) represent 1, and count up from there to get to 36. I am pretty sure since each bit has a nice flat distribution, then the whole range 1-36 would also have a nice flat distribution.

  34. bob says:

    As no-one’s mentioned it yet: collecting entropy from your laptop’s wireless receiver is quite hard to duplicate.

  35. MRE says:

    @deez – exactly the concept on which craps is based. Snake-eyes and double six are quite hard to roll, thus the take is quite high. 6 and 7 ‘any way’ (1 and 5, 2 and 4, 3 and 3, etc) is pretty easy (common), and thus the take is low.

    @blue – another method that amounts to the same thing is to say that the first die represents a row and the second the column on a 6×6 table, in which the numbers 1 to 36 are filled in.
    Each die adds a dimension, so 3 dies yields 216 numbers, etc. This could get pretty cpu intensive to maintain the look-up tables as you add successive dies (dimensions)
    removing the idea that the die itself represents a random number and instead represents an *indexing component* to a number should give flat results (as you say).
    But as everyone else pointed out, quality of the die affects it quite a bit.

  36. bob says:

    http://www.araneus.fi/products-alea-eng.html

    how about a diy version of something like this?

  37. DeFex says:

    Pedro i am talking about with nothing plugged in, highly amplified analog inputs make noise by themselves from electronic noise of transistor junctions etc, the crappier the circuit (onboard audio) the better.

  38. GTMoole says:

    “who the fuck is complaining about the quality of the random numbers?”

    Obviously, the losers.

  39. markps2 says:

    a unique analoge to digital interface!

  40. Nate says:

    I have a true RNG set up. It collects Wi-Fi raw signals, audio line-in noise, thermal data, dick IO, Intel’s on-chip random number generator, and radio noise, as well as Linux’s built-in PRNG. It’s pretty much impossible to predict.

  41. nate says:

    Well, that is an awkward typo.

  42. Jed says:

    @MRE

    Just use base 6, and have the 6’s represent 0.

    If you wanted a random number from 0-1295, just roll 4 dice. 3526, would be 3520 in base 6 or 840 in base 10.

  43. Andrew says:

    It seems like what deez was talking about would most likely work the best. Either that or what Jed has said.

    http://www.squidoo.com/Do_it_yourself_solar_panels

  44. ROLLING STONES to the rescue then.. ingenious thinking. Cheers

  45. my best mates brother has just been sponsored by pokerstarshe gets 50k a month to play any tourneys he wantsa at the end of the month he gets a percentage of winnings. how many others are doing the same thing for pokerstars how can this make it fair in anyway, there all cheats ipoker software the worse.

  46. Boyes says:

    Amazing post, this really hits home with me.. I have experienced similar situations.. best online casino

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,353 other followers