Durango Bill’s

Calculating Optimal Strategy for Video Poker

Video Poker Probabilities

Video Poker Probabilities

How to Calculate Optimal Strategy for Video Poker

with Probability Results for Two Popular Versions

If you are going to play Video Poker, you will have your best chance of winning (losing less rapidly) if you calculate/evaluate optimal strategy for each hand and then use this strategy to guide your play.

Video Poker is one of the more popular slot and online versions of playing poker. There is no bluff factor, and the game is reduced to you, the player, vs. the machine. You are initially dealt 5 cards. Then you discard anywhere from 0 to 5 cards. You then draw from the remaining deck to replace your discards. The value of the resulting poker hand is determined by a “Payoff Table”. A typical “Payoff Table” for a “Jacks or Better” game for each $1.00 bet might look like:

Poker Payoff

Hand Amount

----------------------

Royal Flush $800

Straight Flush 50

4 of a Kind 25

Full House 9

Flush 6

Straight 4

3 of a Kind 3

2 Pair 2

Pair >= Jacks 1

Everything else 0

Strategy is involved with Video Poker. If you are dealt 3 of a kind and 2 other worthless cards, then it is obvious that your optimal strategy is to discard the two worthless cards and draw two cards to try to improve your 3 of a kind.

In the real world, you rarely have the luxury of being dealt something that is easy to evaluate. In the real world, you are frequently dealt a pile of #$%^&, and have to make the best of a bad combination.

We will present two possible initial hands for “Jacks or better” and show 4 possible strategies for each. Each table below shows the initial hand followed by 4 possible hold/draw strategies. The “Expected Value” is the long term average payoff-per-game result that you would get if you played a very large number of these hands using these possible strategies.

Queen Jack 10 9 9 Expected

Hearts Hearts Hearts Spades Clubs Value

------------------------------------------------

Hold Hold Hold Draw Draw 1.4699

Draw Draw Draw Hold Hold 0.8237

Hold Hold Hold Draw Hold 0.8085

Hold Hold Hold Hold Draw 0.8085

Jack 10 9 8 8 Expected

Hearts Hearts Hearts Spades Clubs Value

------------------------------------------------

Draw Draw Draw Hold Hold 0.8237

Hold Hold Hold Draw Hold 0.7447

Hold Hold Hold Hold Draw 0.7447

Hold Hold Hold Draw Draw 0.6762

For the first hand, the optimal strategy is to discard the pair of 9’s and draw to the 3-card straight flush. The next best strategy is the opposite - keep the 9’s and draw to the existing pair. 3rd and 4th best strategies are to toss one of the 9’s and draw for a possible straight.

The 2nd hand is similar to the first except the rank of each card has been decreased by one. This decrease in rank radically changes the optimal strategy. Now the best strategy is to keep the pair of eights and discard the 3 cards to a straight flush. Tossing one of the eights and drawing for a possible straight produces a tie for the next best strategies. Finally, drawing to the 3-card straight flush has dropped to 4th place.

If you follow the optimal strategy for the first hand, the table below shows the probability of filling various results, plus the contribution of each of these results toward the total expected value for the hand. (The expected pay contribution for any hand is the probability that you will end up with that hand (after the draw) times the “payoff” for that particular hand. The “payoff” per hand uses the table shown earlier.)

Hand Probability Expected Pay Cumulative

Name of this result Contribution Pay Contribution

------------------------------------------------------------------

Royal Str. Flush 0.000925 0.740056 0.740056

Straight Flush 0.001850 0.092507 0.832562

4 of a kind 0.000000 0.000000 0.832562

Full House 0.000000 0.000000 0.832562

Flush 0.038853 0.233117 1.065680

Straight 0.026827 0.107308 1.172988

3 of a kind 0.008326 0.024977 1.197965

2 pair 0.024977 0.049954 1.247919

Pair: >= Jacks 0.222017 0.222017 1.469935

Pair tens or worse 0.676226 0.000000 1.469935

How to
Evaluate/Calculate the Optimal Strategy for Video Poker Hands

Good News: We will show how to calculate the optimal strategy for any given hand for Video Poker.

Bad News: There is no simple set of rules for optimal strategy. Optimal strategy can only be calculated by a brute force computer program. Of course, if you are playing Video Poker online, you could simultaneously being running a computer program to evaluate the optimal strategy for each hand as it is encountered. Then your “modus operandi” would be:

1) Let your online Video Poker game deal a poker hand.

2) Switch to the computer program to enter and evaluate this hand.

3) Switch back to the online Video Poker game and use the optimal strategy.

A computer does not have the “common sense” that humans might have when it comes to evaluating the potential draw combinations for a poker hand. However, computers are very good at running repetitive, simple calculations for a very large number of trials. Thus, to evaluate what cards to hold/draw, a computer does not try to use “common sense”. A computer can only use brute force to generate all possible combinations, make the necessary evaluations for each of these combinations, apply the probability calculations to each of these possible results, and pick the best result. (For the tables in the prior examples, the results were sorted and the 4 best strategies for each are shown.)

There are 32 possible choices regarding which cards to keep from your initial 5 card poker hand. Choice number one is to keep all 5 cards. (You have a pat hand.) There are 5 possible ways that you can keep 4 cards and discard the fifth card. There are 10 possible ways that you can keep 3 cards and replace the other two. There are 10 more combinations of keeping two cards and drawing three. There are 5 ways you can keep 1 card and draw 4. Finally, you can toss the whole hand and draw 5 new cards. If you add all of these combinations together, the total comes to 32 different possible strategies for your poker hand.

For each of these 32 possible strategies, you have to calculate the expected value of the result. Strategy number 1 is easy - just keep all 5 cards. All you have to do is evaluate what kind of poker hand you have, and look up the amount in the “Payoff Table”. Using the given “Payoff Table” as an example, a pat hand with a Straight is worth $4. This becomes the “Expected Value” for this particular poker hand for strategy number 1.

Things start getting more complicated when you draw one or more cards. For strategy number two, let’s assume that you are going to discard the leftmost card in your hand and replace it with one of the remaining 47 cards in the deck. Each of these other 47 possible draws is equally likely. A computer program would systematically try all 47 possible draws, evaluate the result of each, look up the value of each of these results in the “Payoff Table”, keep a running total for all of these payoffs, and finally divide by the number of possible draws. (In this case, this is 47 possible draws.) The result is the “Expected Value” for strategy number two. Strategies 3, 4, 5, and 6 are similar one card draws for the other cards in your hand.

Things get deeper if you draw 2 cards. There are 10 possible ways that you can discard 2 cards and replace them with two other cards from the remaining deck. For each of these ten possible strategies there are COMBIN(47,2) = 1,081 possible card combinations that could be drawn. This time, for each of the 10 strategies, the computer program would generate all 1081 possible draws, evaluate the result, use the “Payoff Table” to find the valuation, add all the payoffs together, and finally divide by COMBIN(47,2) to get the expected value for each of these 10 possible strategies.

If you draw 3 cards, the combinations get still deeper. Now for each of the 10 possible strategies, the computer has to check COMBIN(47,3) = 16,215 possible draw combinations.

If you draw 4 cards, there are 5 possible strategies. Each of these has COMBIN(47,4) = 178,365 possible draw combinations. Finally, if you draw 5 cards, there are COMBIN(47,5) = 1,533,939 different draw possibilities.

After you have calculated the expected value for all 32 possible strategies, all you have to do is see which one has the largest “Expected Value”. The strategy with the largest “Expected Value” becomes the “Optimal Strategy” for this particular Poker hand.

We can add all of these partial results together to get some idea of how many poker hands the computer has to generate/evaluate just to find the optimal strategy for one particular poker hand.

Stand Pat: COMBIN(5,0) x COMBIN(47,0) = 1

Draw 1: COMBIN(5,1) x COMBIN(47,1) = 235

Draw 2: COMBIN(5,2) x COMBIN(47,2) = 10,810

Draw 3: COMBIN(5,3) x COMBIN(47,3) = 162,150

Draw 4: COMBIN(5,4) x COMBIN(47,4) = 891,825

Draw 5: COMBIN(5,5) x COMBIN(47,5) = 1,533,939

Total = 2,598,960 poker hands to generate/evaluate just to find the optimal strategy for any given poker hand.

This can be carried one step further. Suppose you want to evaluate the expected return/value for playing Video Poker. There are COMBIN(52,5) = 2,598,960 possible initial poker hands that you could be dealt. Your computer program would have to generate all 2,598,960 of these possible initial hands and then carry out the above 2,598,960 evaluations on each of these initial hands. If your computer can generate/evaluate these final results at 1,000,000 per second, it will take 2 1/2 months to get an answer. Of course, next week the casino can change the payoff table and it will take another 6+ trillion poker hand evaluations before you will find out if you can win in the long run even if you use optimal strategy. In practice, the computation time was much faster, but it still took a couple of days.

Note: Long after I ran these initial calculations, Ryou Niji sent me an email outlining an "Inclusion-Exclusion" algorithm that he used where he constructed a look-up table that used a maximum of a couple of hundred addition/subtraction operations instead trying the millions of draw combinations for each possible initial hand. I haven't written a program to verify the algorithm, but it would appear to be thousands of times faster than the brute force calculations described above.

Probabilities for
Two Popular Versions of Video Poker

The author’s computer program can calculate the expected value of most variations of Video Poker using the above brute force approach. There are dozens of different variations in game rules and “payoff tables”. The following tables are valid only for “Jacks or Better” and “Tens or better”, and only for the payoff amounts shown in the tables. Any change in the “payoff amounts” will change the optimal strategy. Thus scaling the results for different payoff amounts is not valid. In most cases, such attempts will slightly understate any new expected return.

Single Deck,
Jacks or Better

In “Jacks or Better” video poker, a player is dealt 5 random cards from a single deck of 52 cards. (There are no wild cards.) The player may keep all 5 cards, or may discard anywhere from 1 to 5 of these cards. New cards are randomly dealt from the remaining deck to replace the card(s) that were discarded. The resulting hand is then evaluated for the hand types shown in the 1st column below. Then for each dollar that the player has bet, he “wins” the amount shown in the 2nd column in the table. (Note: the payouts in this table are toward the high end of what casinos will pay. Lower payout amounts mean the casino will “take your money” at a faster rate.)

The “Expected Win Probability” column shows the probability that after the draw you will end up with that particular hand if you use “optimal strategy”. The Expected Return” column shows the long term expected “win contribution” for each of these hands. The “Expected Return” is the product of the “Payoff Amount” times the “Expected Win Probability”.

The “Cumulative Return” column gives a running total of these “Expected Returns”. The amount at the bottom of this column shows how much money is returned to the player for each $1.00 game. The 0.9954+ number at the bottom means the player gets back $0.9954 for each dollar bet. The casino keeps the other $1.00 - $0.9954 = $0.0046 per game. Of course, if a player does not use optimal strategy, the casino takes his money at a somewhat faster rate.

Calculations and computer program
by Bill Butler

Poker Payout (Win) Expected Win Expected Cumulative

Hand Amount Probability Return Return

---------------------------------------------------------------------------------

Royal Straight Flush $800 0.00002476 0.01980661 0.01980661

Other Straight Flush 50 0.00010931 0.00546545 0.02527207

Four of a kind 25 0.00236255 0.05906364 0.08433571

Full House 9 0.01151221 0.10360987 0.18794558

Flush 6 0.01101451 0.06608707 0.25403264

Straight 4 0.01122937 0.04491747 0.29895011

Three of a kind 3 0.07444870 0.22334610 0.52229621

Two Pairs 2 0.12927890 0.25855780 0.78085401

Pair: Jacks or Better 1 0.21458503 0.21458503 0.99543904

Lower pair or no pairs 0 0.54543467 0.00000000 0.99543904

Note: The results shown in the above table were calculated independently by the author, and confirm the results shown in the “Full Pay” Jacks or Better table at “The Wizard of Odds”. http://wizardofodds.com/videopoker/tables/jacksorbetter.html

The term "approximate" was used because changes to the payout table will also change the optimal strategy that players should use. The actual expected value of the game

The following table shows the “Value of the Game” for a few other various payout rates. In all cases, the value of the game is what you get back for each $1.00 that you bet provided that you use optimal strategy.

RSFl. StFl. 4Kind FlHs. Flush Strt. 3Kind 2Pair PrJk+ Value

250 50 25 8 5 4 3 2 1 0.96063548

250 50 25 8 6 4 3 2 1 0.97223302

250 50 25 9 5 4 3 2 1 0.97215578

250 50 25 9 6 4 3 2 1 0.98373457

500 50 25 8 5 4 3 2 1 0.96583474

1000 50 25 8 5 4 3 2 1 0.97808638

Single Deck, Tens
or Better

In “Tens or Better” video poker, a player is dealt 5 random cards from a single deck of 52 cards. (There are no wild cards.) The player may keep all 5 cards, or may discard anywhere from 1 to 5 of these cards. New cards are randomly dealt from the remaining deck to replace the card(s) that were discarded. The resulting hand is then evaluated for the hand types shown in the 1st column below. Then for each dollar that the player has bet, he “wins” the amount shown in the 2nd column in the table. (Note: the payouts in this table are toward the high end of what casinos will pay. Lower payout amounts mean the casino will “take your money” at a faster rate.)

The “Expected Win Probability” column shows the probability that you will have that particular hand if you use “optimal strategy”. The Expected Return” column shows the long term expected “win contribution” for each of these hands. The “Expected Return” is the product of the “Payoff Amount” times the “Expected Win Probability”.

The “Cumulative Return” column gives a running total of these “Expected Returns”. The amount at the bottom of this column shows how much money is returned to the player for each $1.00 game. The 0.9914- number at the bottom means the player gets back $0.9914- for each dollar bet. The casino keeps the other $1.00 - $0.9914 = $0.0086 per game. Of course, if a player does not use optimal strategy, the casino takes his money at a somewhat faster rate.

Calculations and computer program
by Bill Butler

Poker Payout (Win) Expected Win Expected Cumulative

Hand Amount Probability Return Return

---------------------------------------------------------------------------------

Royal Straight Flush $800 0.00002568 0.02054596 0.02054596

Other Straight Flush 50 0.00010282 0.00514112 0.02568708

Four of a kind 25 0.00235832 0.05895806 0.08464514

Full House 6 0.01149738 0.06898429 0.15362942

Flush 5 0.01065401 0.05327004 0.20689946

Straight 4 0.01235724 0.04942897 0.25632843

Three of a kind 3 0.07426504 0.22279511 0.47912354

Two Pairs 2 0.12900666 0.25801331 0.73713686

Pair: Tens or Better 1 0.25425067 0.25425067 0.99138752

Lower pair or no pairs 0 0.50548218 0.00000000 0.99138752

Note: The results shown in the above table were calculated independently by the author, and confirm the results shown in the “Tens or Better” table at “The Wizard of Odds”. http://wizardofodds.com/videopoker/tables/tensorbetter.html

Summary for Video
Poker

Casinos are not in the business of letting players win over the long run. There are some versions of Video Poker where the odds are slightly in favor of the player. This is particularly true in some versions that use wild cards. If the expected value of a game slightly favors the player, the Casino is not doing this as a favor to the player. The rules for older versions of the games/payoff tables were established before computers were available that had the processing power to evaluate the “expected value” of a game. As these results become known, the casinos will change the rules and/or the “Payoff Tables” so that the player doesn’t really have a chance over the long run. Even if you do find a game where the “Expected Value” favors the player, the margin is so small that the expected profit is not worth the time that you spend playing the game.

Finally, computers can simulate a large number of Video Poker games at rates far faster than what humans can play. The results of these simulations show that median results for a player are most often significantly worse than the “Expected Value”. To reach the “Expected Value” you have to play enough games so that multiple large payoffs (e.g. Royal Straight Flushes) are included in the results. The average player may play several thousand games and never see a large payoff. The result will be that your monetary return will usually be significantly worse than the calculated expectation.

All of the above calculations assume that you are playing an “honest game”. It is quite possible the “casino” on the other end of your computer screen is the same person who is going to reward you for helping him get his millions out of “Lower WeWillSuckerYou”.

Return to the main Poker page

Return to Durango Bill’s home page

Web page generated via Sea Monkey's Composer HTML editor

within a Linux Cinnamon Mint 18 operating system.

(Goodbye Microsoft)