Check out our brand new Local Poker Communities! Get updates and interact with poker players in your area.
Visit the United States Poker Community | Visit the California Poker Community | Read more about the Launch of P5s Local

Randomness and Unpredictability[ return to main articles page ]

By: grapsfan
Published on Apr 25th, 2008
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:

<SPAN></SPAN>

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.

<SPAN></SPAN>

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.

Comments

  1. <p>Well, though I agree with Graps (from everything I've seen, it seems like the RNG's are random enough to be useful), I'm sure this won't convince everyone.  It's easier to blame the RNG for your losses than to look in the mirror and say that you aren't good, but you wan to get better.</p>
  2. <p>The thing about Graps is not just that he is a great writer, but he includes diagrams!</p>
  3. <p>What did stars pay for this article? :)</p>
  4. <p>mine don't say "bump" in the night.......</p>
  5. <p>My head hurts.</p>
  6. <p>I can understand nine words in this article now! ;) Thanks for the insight.</p>
     
  7. <p>The ONLY thing I notice to be less than randon is the flop comming out all one suit more than I have seen in any cardroom. Then again the number of hands in a cardroom I see are far less than online.</p>
  8. <p>very random indeed...esp when u hit the cashout button and every hand after that is a cooler</p>
  9. <p>grapsfan is comparing apples to oranges. The slot machine algorithm is hard-coded in the hardware.  To suggest that a slot machine algorithm and online poker software algorithm work the same or similar is not correct. </p>
  10. <p>I've always believed their deck is random. It wasn't until Potripper on AP that I realized site owners can be ultra-greedy. The rake just isn't enough for all of them...</p>
  11. <p>  Well I run like shyt usually live and online  so the live deck must be rigged for me too!!!!!</p>
  12. <p>so basically your saying its rigged....ahh I sooooo knew it.</p>
  13. <p>"Some use software feedback (i.e. mouse positioning on client computers) or multiple-seeded algorithms."</p>
    <p>Aha, so moving your mouse when you're all in does prevent bad beats!</p>
  14. <p>It's obv still rigged</p>
  15. <p>I believe the solution is 5</p>
  16. <p>The real problem is NOT that there is no randomness in the typical deal generated by a poker site. Rather it is TOO random. That is because the seed is re-generated with each deal and it is a very, very big seed. (See pokerstars explanation of their seed.)</p>
    <p>By contrast, the 'seed' in a casino deal is much smaller and it is largely fixed. You have a much more stable array in a live 52 card deck than you do online. The dealer scrambles the deck once, pushes them together and places them in the shffle machine. The seed was the scramble and it is never done again unless you ask for a setup.</p>
    <p>The laws of probability are more fully reflected online than live but the way we have learned to play is by interpreting the laws of probability by player experience in live play.</p>
    <p>I would expect that as online play and simulated, non-dealer play both expand, we will see a re-interpretation of how to use the laws of probability in poker. When that happens, online poker would have completely redefined the game.</p>
  17. <p>Not sure I understand your point about "interpreting the laws of probability in live play", zenon.  WTF?  The # of outs, and the probabilities associated with them, don't change unless you know for sure that a card's location in the deck means it isn't in play for this hand.  Shuffling routines in live card rooms are good enough to avoid that situation the vast majority of the time.</p>
     
    Thread Starter
  18. <p>It may be random, but I see a certain pattern continuing all the time when playing tournaments on AP. It also depends on the the number of chips you are holding. The larger stacks usually have a greater probability of winning than the smaller stacks no matter what cards they are holding. I think live games are naturally more random without certain patterns repeating all the time like you find online.</p>
  19. <p>very solid explanation of the processes... tyvm!!!</p>
     
  20. <p>Self fulfilling prophecy - a negative mindset will cause negative results to become more likely.  </p>
    <p>thought translation via the energy of your mind (all energy in the universe is part of one large "energy field" if you will) of that negative mindset will result in changing the RNG, or the shuffle, to be set so that the outcome of the hands or tournaments you are in WILL be negative, as expected.  </p>
    <p>hence, tinfoil hat = keep that negative mindset from completely leaking out into the energy field and thus allowing better results.</p>
 
Page 1 of 21 2

Return to Articles

Quick Navigation