"Shuffle up and deal!"
Had a chance to play online at PokerStars today. Entered a $5.50 No Limit Texas Hold 'Em Turbo. 2,800 players signed up. No re-buys - no add-ons.
Lasted for less than an hour. In fact I was only dealt 41 hands until I busted out. Of those 41 hands I took the Flop on 19% of them.
The reason I'm even mentioning this is not to further illustrate my exceptionally low-level donkness, but to share an observation about the "random" shuffles and the results therein. During those first 41 hands of the tournament I saw Pocket Rockets dealt 9 times. Once to me, but as my recent luck would have it, they were also dealt to an opponent two seats away. We split the pot after getting all of our chips in the middle.
Not only did Aces come out 9 times on 41 hands, but pocket Jacks and pocket Queens were also dealt 4 times each.
Okay, at this point you'd be right to expect this blog entry to dissolve into a major rant over online poker software, how their decks are "randomly" shuffled and more nonsense about the theory behind Random Number Generators.
I will resist the temptation to do so and just say a few more words and leave you with an explanation of all of the above taken directly from the PokerStars WWW page.
Last time I checked, you can expect to be dealt pocket aces once in about every 220 hands. Holy crap, the folks at today's $5.50 tourney were all apparently overdue for their pocket aces, because those things were shooting out faster than lame props at a Carrot Top show.
Veteran poker players vow that online deck shuffles are on the up-and-up and the only reason you witness more anomalies is due to the increased number of hands that can be dealt per hour compared to the number of hands being dealt at a brick and mortar casino.
That's all well and good and I respect that logic, but I can't stop that feeling deep in my heart of hearts that something about online poker doesn't add up.
So here's how my favorite poker site sums up all of this, and I have to tell you it does not make a whole lotta sense to me. Especially the references to "mouse movements, thermal noise, and the required amount of entropy" which I find to be very strange and hard to understand.
"Anyone who considers arithmetic methods of producing random digits is, of course, in a state of sin." - John von Neumann, 1951
We understand that a use of a fair and unpredictable shuffle algorithm is critical to our software. To ensure this and avoid major problems we are using two independent sources of truly random data:
user input, including summary of mouse movements and events timing, collected from client software
true hardware random number generator developed by Intel, which uses thermal noise as an entropy source
Each of these sources itself generates enough entropy to ensure a fair and unpredictable shuffle.
A deck of 52 cards can be shuffled in 52! ways. 52! is about 2^225 (to be precise, 80,658,175,170,943,878,571,660 ,636,856,404,000,000,000,000,0 00,000,000,000,000, 000,000,000 ways). We use 249 random bits from both entropy sources (user input and thermal noise) to achieve an even and unpredictable statistical distribution.
Furthermore, we apply conservative rules to enforce the required degree of randomness; for instance, if user input does not generate required amount of entropy, we do not start the next hand until we obtain the required amount of entropy from Intel RNG.
We use the SHA-1 cryptographic hash algorithm to mix the entropy gathered from both sources to provide an extra level of security.
We also maintain a SHA-1-based pseudo-random generator to provide even more security and protection from user data attacks.
To convert random bit stream to random numbers within a required range without bias, we use a simple and reliable algorithm. For example, if we need a random number in the range 0-25: we take 5 random bits and convert them to a random number 0-31, if this number is greater than 25 we just discard all 5 bits and repeat the process.
This method is not affected by biases related to modulus operation for generation of random numbers that are not 2n, n = 1,2,..
To perform an actual shuffle, we use another simple and reliable algorithm:
first we draw a random card from the original deck (1 of 52) and place it in a new deck - now original deck contains 51 cards and the new deck contains 1 card then we draw another random card from the original deck (1 of 51) and place it on top of the new deck - now original deck contains 50 cards and the new deck contains 2 cards. We repeat the process until all cards have moved from the original deck to the new deck. This algorithm does not suffer from "Bad Distribution Of Shuffles."
PokerStars shuffle verified by Cigital and BMM International.
PokerStars submitted extensive information about the PokerStars random number generator (RNG) to two independent organizations. We asked these two trusted resources to perform an in-depth analysis of the randomness of the output of the RNG, and its implementation in the shuffling of the cards on PokerStars. Both independent companies were given full access to the source code and confirmed the randomness and security of our shuffle.
End of PokerStars Explanation
Perhaps the best hand of those wonderful 41 I witnessed today was hand 33 or 34. Three players saw a flop of 7h, 7d, 7c. The first two players checked and the third bet 300. Both checkers folded and the winner raked the pot and showed:
Isn't online poker great?!?