My video poker analysis program and how it works

Jun 18, 2013 3:00 AM

Last week, I discussed the 32 different ways a 5-card video poker hand can be played. This, is of course, the theoretical ways.

When one looks at his 5-card hand, he rarely (OK, never) reviews all 32 ways. This isn’t because it isn’t practical to do so, but rather because it is simply unnecessary.

If a player is dealt a Pair of 3’s, along with a 4-5-6 of mixed suits, he doesn’t have to give any thought to throwing away one of the 3’s, along with a 4 and 5 and keeping an offsuit 3-6. I can’t imagine what a paytable would have to look like to make this the right way to play the hand.

If a Straight were to pay that well, he would hold 3-4-5-6. If a Pair (or Trips, etc.) were to pay high enough, it might be worth it for him to keep the Low Pair. If a Straight Flush payout was high enough, it might persuade him to keep the suited cards of the Straight, in order to go for the Straight Flush.

When I programmed my video poker analysis program, I didn’t have it eliminate any of the 32 possible ways as, well, “too dumb to consider.” Given the nature of programs, it is easier to simply tell the program to play every hand every way and then compare the results. No need to make ANY assumptions.

So, what does a video poker analysis program do with the 32 possible ways the hand can be played? To put it simply, it plays all 32 of them and figures out the final hand for EVERY possible draw for each one of them.

So, it begins with the easiest scenario of holding all five cards. The hand is currently a loser, so the expected value for this way is 0. Not likely the right play. On the other end of the chart is to discard all five cards.

The program will figure out the final hand for all 1,533,939 possible draws, taking into account the five cards that were already dealt and discarded. While the exact expected value will vary slightly depending on exactly which cards were originally dealt, the approximate expected value of this Razgu will be 0.36.

It will then evaluate the remaining 30 ways. Along the way, it will come across the most likely hand that will prove to be the correct strategy. It will hold the Pair of 3’s and discard the 4-5-6. It will review the 16,215 possible draws and determine how many Two Pairs, Trips, Full Houses and Quads the Player will wind up with.

These are the only winning hands from a Pair of 3’s. It will add up the total payout the player can expect to win if every possible draw is played, and then divide this number by the total possible draws (16,215) to arrive at the expected value of this hand. It will be 0.82. This outranks the Draw 5 and Discard 5, so we can eliminate those hands as possible plays.

It will eventually come across the 3-4-5-6 (off-suit). It will review the 47 possible draws and determine that eight will result in a Straight. The Straight pays 4, so the Player will get back 32 units. Divide this by 47 and the expected value is just about 0.68. This is below the Low Pair, so the Low Pair continues to be the proper play.

The program will keep going, analyzing absurd possibilities like holding an offsuit 3-6. It’s not even worth my time to determine what the expected value of such a hand is. I know it will be below the Razgu’s 0.36. So, while the program will go through the motions of analyzing even this hand’s 16,215 possible draws, I will not waste my time on it.

Perhaps there is a suited 3-4-5 in the hand I described. The program will analyze the 1,081 possible draws. Just as before, it will determine how many winning hands will be drawn and multiplies each by its payout. It will sum up these values and divide by 1,081 to get this hand’s expected value. It will be about 0.63, still below the Low Pair.

The program will go through ALL 32 ways and keep track of which one of the 32 has the highest expected value. In the case shown here, it will prove to be the Low Pair with its 0.82, and this becomes the proper play for this hand.

It is not necessary for a player to memorize the expected value for any hand. You must, however, remember the order of the strategy table that lists the hands in descending order of expected value. You do not need to know that a Low Pair has an expected value of 0.82, but you will need to know that it outranks a 4-card Straight with 0 High Cards and a 3-card Straight Flush with 0 High Cards.

Yes, if you want to become an Expert Player, you’ll need to learn the strategy table.

Elliot Frome is a second generation gaming analyst and author. His math credits include Ultimate Texas Hold’em, Mississippi Stud, House Money and many other games. His website is www.gambatria.com. Contact Elliot at [email protected].

 GamingToday on Facebook      and         GamingToday on Twitter