maksports
maksports
  • Threads: 1
  • Posts: 4
Joined: Oct 12, 2017
October 12th, 2017 at 3:17:37 PM permalink
Please describe the calculation of the "Combinations" column in Video Poker wizard-of-odds pay table
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26496
Joined: Oct 14, 2009
October 12th, 2017 at 7:10:11 PM permalink
Quote: maksports

Please describe the calculation of the "Combinations" column in Video Poker wizard-of-odds pay table



It is the expected number of times you'll see that hand, given all roughly 20 trillion possible outcomes of the deal and draw.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
maksports
maksports
  • Threads: 1
  • Posts: 4
Joined: Oct 12, 2017
October 13th, 2017 at 12:47:17 AM permalink
Below is a fragment of the pay table for Wizard-of-Odds Triple Double Bonus Poker 9/7


Hand Payoff Combinations
Royal flush 800 439463508
Straight flush 50 2348724720
...
4 2-4 + A-4 400 3440009028
...
3 of a kind 2 1468173074448


Can you show the calculations or provide code that, when applied, leads to these specific numbers in the Combinations column?

Thank you.
beachbumbabs
beachbumbabs
  • Threads: 100
  • Posts: 14265
Joined: May 21, 2013
October 13th, 2017 at 9:53:50 AM permalink
My understanding is, as an example: The Royal flush would be every possible permutation of those 5 cards appearing, either on the deal, or drawing 1,2,3,4, or 5 to it, multiplied by every sequence they could appear, either dealt or drawn, x4 suits. That's why the numbers are so big.

The Wizard may answer again, however, so I'll step out. But I think you could craft the formulas by breaking them down as I described, into 6 subgroups of dealt, draw 1, etc.

Since for most games, the order of cards or the slot drawn cards appear in doesn't matter, you should not have to calculate further.
If the House lost every hand, they wouldn't deal the game.
RS
RS
  • Threads: 62
  • Posts: 8626
Joined: Feb 11, 2014
Thanked by
beachbumbabs
October 13th, 2017 at 10:27:38 AM permalink
Quote: beachbumbabs

My understanding is, as an example: The Royal flush would be every possible permutation of those 5 cards appearing, either on the deal, or drawing 1,2,3,4, or 5 to it, multiplied by every sequence they could appear, either dealt or drawn, x4 suits. That's why the numbers are so big.

The Wizard may answer again, however, so I'll step out. But I think you could craft the formulas by breaking them down as I described, into 6 subgroups of dealt, draw 1, etc.

Since for most games, the order of cards or the slot drawn cards appear in doesn't matter, you should not have to calculate further.


That's partially true, I think. One problem in calculating these out by hand is it's difficult to subtract out the hands where you do not hold the RF draw. Sure, you can calculate all hands where you are dealt 3RF, but it's a bit more difficult to subtract out hands like As, Ac, Ah, Kh, Qh.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6271
Joined: Jun 22, 2011
October 13th, 2017 at 1:50:37 PM permalink
Quote: Wizard

It is the expected number of times you'll see that hand, given all roughly 20 trillion possible outcomes of the deal and draw.


I was going to try to answer this, but where did you come up with the number 19,933,230,517,200?

That's (52)C(5) x (47)C(5) x 5.

The way I see it, for each of the (52)C(5) deals and (47)C(5) sets of the five draw cards, each deal's best play can be divided into one of six groups:
Draw 5: only one set of 5 from the draw cards
Draw 4: 5 sets of draws
Draw 3: 10 sets of draws
Draw 2: 10 sets of draws
Draw 1: 5 sets of draws
Draw 0: one "draw" of zero cards
The largest denominator becomes (52)C(5) x (47)C(5) x 10, which is twice the number you have.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6271
Joined: Jun 22, 2011
October 14th, 2017 at 9:31:58 AM permalink
After some further number crunching, I think I know where 19,933,230,517,200 comes from.

If you discard all five of your cards, the total number of combinations = the 2,598,960 deals x the 134,459 ways to draw 5 cards from the remaining 47.

If you discard only four cards, it is 2,598,960 x 270,725.

However, the 5-card number divided by the 4-card number is 43/5. In order to get a "common denominator" when adding, say, the full houses from drawing five cards to the full houses from drawing four, multiply the 5-card value by 5 and the 4-card value by 43.
Note that the "numerators" are multiplied by the same numbers as well - i.e. every Royal Flush drawn from a 5-card draw is counted 5 times, while every RF from a 4-card draw is counted 43 times.
While you're at it, multiply the 3-card value (2,598,960 x 16,215) by 473, the 2-card value (2,598,960 x 1081) by 7095, the 1-card value (2,598,960 x 47) by 163,185, and the "keep all 5 cards" value (2,598,960) by 7,669,695.

The "common denominator" is 19,933,230,517,200.
maksports
maksports
  • Threads: 1
  • Posts: 4
Joined: Oct 12, 2017
October 14th, 2017 at 11:16:23 AM permalink
Wow!
I'm not clear why this works or why the total of all the values in the combinations column should be equal to this "common denominator".
Is there some insight here that will yield an algorithm for the values in the combinations column of the wizard's pay table's?

For example: in Triple Double Bonus 9 /7 the combinations value for Flush =311,320,443,672.



Thanks for this detective work. I haven't digested it yet.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6271
Joined: Jun 22, 2011
October 14th, 2017 at 1:17:32 PM permalink
Quote: maksports

Wow!
I'm not clear why this works or why the total of all the values in the combinations column should be equal to this "common denominator".
Is there some insight here that will yield an algorithm for the values in the combinations column of the wizard's pay table's?


Here is how I assume it is done (only The Wizard knows for sure):

Take Royal Flushes as an example.
Each of the 2,598,960 possible deals of 5 cards has a best play - discard 0, 1, 2, 3, 4, or 5 cards.
Four deals are already Royals, so you don't discard any cards - that is 4 / 2,598,960.
If I counted these right, there are 916 deals where you have 4/Royal and not a King-high straight flush, so you discard 1 card - that is 916 / 2,598,960 x 1 / 47, or
916 / 122,151,120.
Do the same with the deals where you keep 3 to a Royal (this is N3 / 2,598,960 x 1 / (47)C(2) = N3 / 2,809,475,760, where N3 is the number of deals), the deals where you keep 2 to a Royal (this is N2 / 2,598,960 x 1 / (47)C(3) = N2 / 42,142,136,400), the deals where you keep 1 to a Royal (this is N1 / 2,598,960 x 1 / (47)C(4), or N1 / 463,563,500,400), and the deals where you discard all five cards and then draw a Royal (this is N0 / 2,598,960 x 1 / (47)C(5), or N0 / 3,986,646,103,440).
The sum of the six fractions is the number that appears in the "combinations" column for Royal Flushes, divided by 19,933,230,517,200.

Now, do the same thing for straight flushes, then fours-of-a-kind, then full houses, and so on down to losing hands.
Had you not divided the sum of each set of six fractions by 19,933,230,517,200, they would add up to 1.
19,933,230,517,200 is used because it is the smallest number which, when you multiply each result's six-fraction sum by it, results in an integer.

The word "combinations" is what is confusing. I assume (there's that word again) that it is there because it is the word used when analyzing other games, such as roulette. What the column represents in the case of Video Poker is, "The probability that, using perfect basic strategy, you will get this result, multiplied by the number in this column in the 'Total' row."
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26496
Joined: Oct 14, 2009
October 14th, 2017 at 10:10:21 PM permalink
Quote: maksports

For example: in Triple Double Bonus 9 /7 the combinations value for Flush =311,320,443,672.



If you play perfect strategy, that is how many flushes you will get, on average, if you play the number of hands shown in the total of combinations of whatever table you lifted that from. My computer came up with that number by looping through all the possible combinations.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
maksports
maksports
  • Threads: 1
  • Posts: 4
Joined: Oct 12, 2017
October 15th, 2017 at 8:54:12 AM permalink
Is there a description of the algorithm used to do this classifying of combinations specified in sufficient detail so that I can replicate it? With some concrete numerical examples worked out to demonstrate the process and result?
Computer code would be fine.
Thank you.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6271
Joined: Jun 22, 2011
October 15th, 2017 at 10:56:15 AM permalink
Quote: maksports

Is there a description of the algorithm used to do this classifying of combinations specified in sufficient detail so that I can replicate it? With some concrete numerical examples worked out to demonstrate the process and result?


In order to replicate it in its entirety, you would need to know the correct play for each of the 2,598,960 hands.

I will try to give examples of what I assume is the method:

1. The deal is Ks Kh Kd 3s 3c. The best play is to hold all five cards; there is one result from holding all five cards, which in this case is a full house.
The number of "combinations" for this hand is 7,669,695 - I will explain later where this number comes from.
Thus, this deal results in 7,669,695 full houses.

2. The deal is Ks Kh 3s 3c 2d. The best play is to discard the 2; there are 47 possible draws (replacing the 2d with each of the 47 remaining cards). Count each of the draws as 7,669,695 / 47 = 163,185 "combinations". Of the 47 draws, four (Kd, Kc, 3h, and 3d) make a full house, and the other 43 make two pair.
This deal results in 4 x 163,185 = 652,740 full houses and 43 x 163,185 = 7,016,955 two pairs.

3. The deal is Qh Jh 10h 6c 3s. The best play is to discard the 6 and the 3; there are (47)C(2) = 1081 possible draws. Count each of the draws as 7,669,695 / 1081 = 7095 combinations.
The deal results in:
1 x 7095 = 7095 Royal Flushes
2 (Kh 9h; 9h 8h) x 7095 = 14,190 straight flushes
42 x 7095 = flushes
45 x 7095 = straights
Count the three-of-a-kinds, the two pairs, the high pairs (including the ones where the two drawn cards are both Aces or both Kings), and the losing hands; multiply each count by 7095 to get the number of combinations for each result.

If the best play is to discard 3 cards (e.g. As Ah 3c 5d 8d), there are (47)C(3) = 16,215 possible draws; each draw is 7,669,695 / 16,215 = 473 combinations.

If the best play is to discard 4 cards, there are (47)C(4) = 178,365 possible draws; each draw is 7,669,695 / 178,365 = 43 combinations.

If the best play is to discard all 5 cards, there are (47)C(5) = 1,533,939 possible draws; each draw is 7,669,695 / 1,533,939 = 5 combinations.

Do this for all 2,598,960 possible deals, and add up the "combinations" for each result.

The least common multiple of 1, 43, 16,215, 178,365, and 1,533,939 is 7,669,695; that is why this number is used - each draw can be multiplied by some integer so that the total for that hand is 7,669,695.
  • Jump to: