July 26th, 2025 at 10:57:43 PM
permalink
I have been looking at the Ante Return Table for Three Card Poker wherein all separate events are broken down. For example:
Player wins with straight flush: 617,044
Player has straight flush, dealer doesn't qualify: 266,196
Player ties with straight flush: 144
Player loses with straight flush: 968
Total events involving player with straight flush: 884,352
I have no problem whatsoever figuring out how many combinations exist for each event in its totality, that is: 884,352. But I am banging my head against a wall trying to figure out each event individually. Maybe it's late and maybe I'm tired but I am stuck like Chuck. If anyone can help, you can get me out of what will certainly become an existential crisis lol. Thank you!!!
Player wins with straight flush: 617,044
Player has straight flush, dealer doesn't qualify: 266,196
Player ties with straight flush: 144
Player loses with straight flush: 968
Total events involving player with straight flush: 884,352
I have no problem whatsoever figuring out how many combinations exist for each event in its totality, that is: 884,352. But I am banging my head against a wall trying to figure out each event individually. Maybe it's late and maybe I'm tired but I am stuck like Chuck. If anyone can help, you can get me out of what will certainly become an existential crisis lol. Thank you!!!
July 26th, 2025 at 11:39:06 PM
permalink
Welcome to the Forum :) I assume you are new to the "table game math" world like me.
I quickly wrote some simple JavaScript code that will probably help you. Because it's 2:30am I am not going to test to see if this really works but basically you can use loops to find every possible combination, without the order of cards being taken into account (the dealer having an Ace Queen Jack is treated the same as the dealer having a Jack Queen Ace). Hope this helps and let me know if you have any questions. Sleep well.
the forum is messing up my code to "remove website links" so sorry that some parts are spaced weirdly
I quickly wrote some simple JavaScript code that will probably help you. Because it's 2:30am I am not going to test to see if this really works but basically you can use loops to find every possible combination, without the order of cards being taken into account (the dealer having an Ace Queen Jack is treated the same as the dealer having a Jack Queen Ace). Hope this helps and let me know if you have any questions. Sleep well.
// frenchdeck = ["AC", "AD", "AH", "AS", "KC", "KD", "KH" etc. all the way to "2S"
// straights = ["A32", "432", "543", "654", "765", "876", "987", "T98", "JT9", "QJT", "KQT", "AKQ"]
// instancearray = [] this is where all the combinations involving straight flushes will go
for(a = 0; a < 52; a++){
for(b = a + 1; b < 52; b++){
for(c = b + 1; c < 52; c++){
for(c = 0; d < 52; c++){
for(e = d + 1; e < 52; e++){
for(f = e + 1; f < 52; f++){
arr = [a, b, c, d, e, f] . map(x => frenchdeck[x])
if(Array.from([ ... new Set(arr)] . length == 6){ //making sure all cards are different
if((a[1] == b[1] && b[1] == c[1]) && straights . includes(a[0] + b[0] + c[0])){
instancearray[instancearray.length - 1] = [
[a, b, c],
[d, e, f]
]
}
}
}
}
}
}
}
}
return instancearray
the forum is messing up my code to "remove website links" so sorry that some parts are spaced weirdly
July 27th, 2025 at 2:27:23 AM
permalink
Quote: harris
the forum is messing up my code to "remove website links" so sorry that some parts are spaced weirdly
link to original post
(snip)
Once you're off new member probation, that will be sorted out.
No, I do not know when that will be.
No, I cannot accelerate the approval.
I tacitly blame The Algorithm, and kick back to watch the fireworks.
May the cards fall in your favor.
July 27th, 2025 at 7:55:44 AM
permalink
Oh boy, I appreciate the help but this is all way over my head. I'm far from fluent or even conversational in Java. I guess my question would be if there is a way render this on excel?
July 27th, 2025 at 8:31:27 AM
permalink
Quote: DeucesDeucesOh boy, I appreciate the help but this is all way over my head. I'm far from fluent or even conversational in Java. I guess my question would be if there is a way render this on excel?
link to original post
Yes. Keep in mind that that you are looking at the combinations for 3 cards in players's hand and 3 more cards in dealers hand, and the total number of those combinations is c(52,3)*c(49,3).
First let me give you an example.
What are the chances you will get a 543 straight flush, and that you will tie with a dealer's 543 straight flush?
Player combinations to get a 543 SF are 4 (basically 4 possible suits); and then dealer combinations to get a 543 SF (with player's cards removed from the deck) are 3 (3 possible suits); therefore the chance of two 543 SF's tieing are 4*3=12. There are 12 possible SFs: A-hi, K-Hi,Q-Hi . . . 3-Hi. So the total number of combinations for any two SFs tieing are 12*(4*3) = 144.
Now how often does a player get a SF and lose?
Combinations for player getting a AKQ SF and losing are 0.
Combinations for player getting a KQJ SF and losing to an AKQ SF are 4*3=12. The dealer only has 3 ways of making that AKQ SF because player has one suit blocked with his cards.
Combinations for player getting a QJT SF and losing to an AKQ SF or KQJ SF are 4*(3+3)= 24.
Combinations for player getting a JT9 SF and losing to an AKQ, KQJ or QJT SF are 4*(4+3+3)= 40. Note that a dealer AKQ SF has four combinations because all four suits are 'unblocked' by player's cards.
Combinations for player getting a T98 SF and losing to an AKQ, KQJ, QJT or JT9 SF are 4*(4+4+3+3)= 56.
If you complete this exercise for all the player SFs down to 32A and then sum up the total number of times that all 12 SF's get beat, you will derived the value in your original post.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
July 27th, 2025 at 9:51:01 AM
permalink
With an adjusted suit blocker for the 32A, I did get that exact number! Thank you! Now to see if I can apply this to all other hands xD