Conspiracy theorists love to claim online poker may be rigged, usually to soothe their egos after getting their asses handed to them. The “rigged deck” theory is usually applied in one form or another, often in conjunction with my favorite excuse: “the shuffle can’t truly be random, because a computer can’t generate a truly random number!” This is a very easy argument to put forth, because very few people have the first clue how a random number generator (RNG) works.

I do have a clue. I spent two years working at WMS Gaming, verifying various aspects of slot machine game play and payout, including number probability and distribution. I will do my best to teach you some of what I know.

Computer people usually talk about pseudo-RNGs (PRNGs), in concession to the fact that, yes, a computer algorithm to generate a random number does not have an infinite value range to work within. The size of the seed, the number used to start the RNG process, is limited by the mathematics of the computer. The true implications of “PRNG v. RNG” are technicalities which fall outside the boundaries of my educational background, and probably everyone reading (unless you happen to be a doctoral candidate in number theory). So I’ll keep using the RNG acronym for now and you can assume that I know we’re really talking about pseudo-random numbers.

RNG algorithms start with a seed, a number which kicks off the process. This seed is a very large number (VLN) which should have no predictable source. Most computer systems use a derivative of system time: number of milliseconds elapsed in the current day is common, as is system date & time, expressed as an integer number of seconds since a long time ago. You then take the seed and put it through some arithmetic function with another VLN, to generate a third VLN. The third VLN is modulo’d (the remainder in a division operation, rather than the quotient) across the range of numbers from which we wish a random number (in the case of a deck of cards, we want a Mod 52). The third VLN becomes the seed to generate the next number, and so on for as many random numbers as you need. As a picture, it looks like this:

Simplistically, this is a linear RNG, and is the basis by which most online poker rooms, slot machines, and other gaming devices and computing systems generate random numbers.

The problem with such a straight-forward linear RNG is that you can, with some computing horsepower, look at the system outputs and determine what the arithmetic function and seed may be, to narrow down the possibilities for the next random number (if not lock in on the precise number). The same initial seed will always produce the same sequence of random numbers. The easiest way to counteract this is to add some form of entropy or external pseudo-random variable. For example, take white noise off an electrical circuit and combine it in a summing junction with each input to the arithmetic function. The result is each input to the arithmetic function is less predictable – making each random number coming out less predictable as well.

One of the problems at Planet Poker, many years ago, is they did not do enough to randomize the feedback loop to the function. Modern online sites have directly addressed this problem with solid technical solutions. Some use software feedback (i.e. mouse positioning on client computers) or multiple-seeded algorithms. Others use hardware-based RNG algorithms, which take signals from oscillating crystals or noise samples from within the circuitry.

All sites are also smart enough to use a distributed RNG, so you would have to be aware of numbers being generated for every “dealer” on the site to reverse engineer the seed and determine the next outcome. Shuffling algorithms, to determine the order of cards based on the random number sequence, are equally complex (this could be a topic for another article, if there is interest from the PocketFives community).

So, if you’re concerned about the randomness and equitable distribution of cards from an online poker site, don’t be. True, the pattern is not truly random…but that’s irrelevant for the game. Shuffling routines for casino dealers are typically not thorough enough to generate true randomness either. And the ShuffleMaster device used in many card rooms is, at its heart, a PRNG computer program in the device’s firmware, subject to the same algorithmic concerns. As poker players and gamblers, we don’t need randomness. We need unpredictability, equivalent odds for the next card off the deck to be any one of the unseen possibilities.

After all of this, if you’re still paranoid, my advice is to withdraw all of your money and not play anymore. No explanation will convince you. I wish you well in your quest to stay safe from the ghosts, goblins, and card cheats going “bump” in the night.