[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]

45 thoughts on “Dice-O-Matic

  1. 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.

  2. 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!

  3. 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

  4. 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.

  5. 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.

  6. 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!

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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!

  12. 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

  13. 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.

  14. 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.

  15. @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.

  16. 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.

  17. 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.

  18. 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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.