With a 52-card deck, there are almost 2.6 million different 5-card hands. When computer programs were designed to calculate the value of a video poker game, they had to examine each of these possibilities.Bob Dancer is one of the world's foremost video poker experts. He is a regular columnist for Casino Player, Strictly Slots, and the Las Vegas Review-Journa land has written an autobiography and a novel about gambling. He provides advice for tens of thousands of casino enthusiasts looking to play video poker. Bob's website is www.bobdancer.com
Even with the lightening speed of computers nowadays, this still took awhile.
Relatively recently, computer programmers have determined that these 2.6 million hands can be examined completely and accurately by looking at about 134,000 hands. This is still a large number, but it's only about a twentieth as big as 2.6 million. So for any given computer, video poker analysis programs (such as WinPoker
) can run twenty times faster than they used to.
Now I am not a computer programmer, and most of you aren't either. But I find this greater efficiency fascinating, and maybe you will too.
First, let's look at a run-of-the-mill full house, say 77744. This one full house appears 24 times in the 2.6 million hands. Let me show you why. There are four different ways to have three sevens: 7s7h7d, 7s7h7c, 7s7d7c and 7h7d7c. And there are six different ways to have two fours: 4s4h, 4s4d, 4s4c, 4h4d, 4h4c, and 4d4c. And since any of the four different ways to have the sevens can happen at the same time as any of the six different ways to have the fours, there are a total of 24 different combinations that are all 77744.
It might seem like all 24 of these are equivalent, but there is one small difference. On half of these 24 cases, both of the fours are suited with sevens. For example, 7h 7d 7c 4h 4c. In the other half of the cases, one of the fours is unsuited with any of the sevens. For example, 7h 7d 7c 4h 4s. Every 77744 hand fits one of these patterns. Other full houses are treated similarly, so of the 3,744 (13 x 12 x 24) unique full houses, they may be completely studied by looking at 312 hands (13 x 12 x 2).
Trips are handled similarly. Consider AAA23. Since the 2 and 3 can be any of the four suits, there are 16 (4 x 4) different combinations. And since there are 4 different ways for the AAA to exist, there are 64 (16 x 4) total combinations for AAA23 to exist. But these 64 ways can be broken down into four patterns. Pattern 1: Both 2 and 3 unsuited with any A: 4 cases. Pattern 2: Both 2 and 3 suited with each other and suited with an A: 36 cases. Pattern 3: 2 suited with an A, 3 unsuited: 6 cases. Pattern 4: 3 suited with an A, 2 unsuited: 6 cases. These 4 patterns can handle any of the 64 actual combinations. This is a 16-times reduction.
Now let's look at two pair hands. How about the Dead Man's Hand, aces and eights? There are actually 1584 different aces and eights hands. We saw earlier that there were six different ways to have a pair of aces, and six ways to have a pair of eights, and 44 other cards to fill out each hand. (Why 44? The last card can be any of the 52 original cards, except not one of the eight aces and eights. If the fifth card were another ace or eight, then the hand would be considered a full house, not two pair.) And 6 times 6 times 44 equals 1584.
Just looking at the four cards making up the aces and eights, we can reduce those 36 combinations down to 3 unique patterns. There were 6 cases where the two pair covered all four suits, e.g. AhAs8c8d. There were 6 cases where the two pair covered only two suits, e.g. AcAd8c8d. And there were 24 cases where the two pair covered exactly three suits, e.g. AcAd8d8s.
Let's look at the first case, where all four suits are covered. We can see that there for a 2 "fifth card", there are two possibilities --- being suited with an ace or being suited with an eight. The same is true for each of the other fifth cards. Since there are a total of 11 ranks where the fifth card may come from, there are 11 times 2 = 22 unique patterns here.
The second case, where only two suits are covered, we also have two possibilities for each fifth card. Either it is suited with both an ace and an eight, or with neither. Again there will be 22 unique patterns here.
For the hands where the two pair covers three suits, there are now four possibilities for each fifth card. It can be suited with an ace, an eight, both of them or neither of them. So there are 11 times 4 =44 of these.
Since there are only these three cases for "aces and eights", every one of the 1,584 possible hands can be uniquely placed into one of the 88 patterns. (22 + 22 + 44 = 88).
It turns out there are 123,552 different two pair hands (about one out of 20 dealt hands), but the methodology shown here can break them down into 6864 (13 x 12 x 88 / 2) unique patterns.
The efficiency savings for full houses, three of a kind, and two-pair hands are relatively easy to demonstrate. The one pair hands (57,200 combinations can completely describe the 1,098,240 combinations) and the no-pair hands (you don't even want to think about these numbers) are somewhat more complicated.
Let's look at the limitations of this system. First of all, all suits must be equal. We can handle AAAA3 having a different value than AAAA5, but if AAAA3h has a different value than AAAA3s, this technique doesn't work at all. Likewise if a royal flush in diamonds pays more than a royal flush in spades, this technique doesn't work there either.
Another feature this system doesn't handle is sequential royals. If the royal, in order, AKQJT pays more than AKQTJ, then this simplification doesn't handle that. Also, wild cards are not part of this simplification. A similar simplification is possible for, say, deuces wild
, but the numbers would be different.
But other than that, this simplification works just fine. This is good for all of us because now we can study every hand much more efficiently than before.