DJTeddyBear
DJTeddyBear
  • Threads: 213
  • Posts: 11096
Joined: Nov 2, 2009
April 26th, 2025 at 12:38:58 PM permalink
I'm working on a new game and some of the math is making my head hurt. So thinking it might help, I asked ChatGPT some preliminary questions and got a really questionable answer.

Question: With a standard 52 card deck plus 1 joker, how many ways are there to deal a straight flush.

This seemed pretty simple to me.

ChatGPT said that there are 12 combinations of A23 thru QKA, times 4 suits = 48, and 6 ways of dealing 3 cards = 288, and I agreed.

ChatGPT said that since any card could be substituted by the joker, there are 288 * 3 ways to deal 3 cards, so 864 combinations of a wild straight flush. I get that simple logic, but is it too simple?

I'm thinking there are 13 two card combinations, A2 thru KA which could be a wild SF when a joker is added, plus 12 gapped combinations, A3 thru QA, which become a wild SF when the joker fills the gap. 25 * 4 suits, * 6 ways to deal 3 cards = 600.

Essentially, ChatGPT is counting two consecutive cards like 3 4 Joker twice - where the joker is either end - a 2 or a 5.

Can someone please confirm one of these methods, because the next step of my game idea - the part where I really need the help - gets really crazy.

FYI: In Excel I have:
Straight Flush = 12 * 4 * 6 = 288 (As above, 12 combinations, 4 suits, 6 ways to deal them)
Wild SF = 25 * 4 * 6 = 600 (25 combinations, 4 suits, 6 ways to deal)
Straight = 12 * 4 * 4 * 4 * 6 - 288 = 4320 (Each card can be any suit, but subtract the straight flush count)
Wild Straight = 25 * 4 * 4 * 6 - 600 = 1800 (The last card is a joker and there's only one)

Thanks.
I invented a few casino games. Info: http://www.DaveMillerGaming.com/ ————————————————————————————————————— Superstitions are silly, irrational, childish rituals, born out of fear of the unknown. But how much does it cost to knock on wood? 😁
ThatDonGuy
ThatDonGuy 
  • Threads: 125
  • Posts: 6983
Joined: Jun 22, 2011
April 26th, 2025 at 3:47:49 PM permalink
It looks like your method is right. Just as you said, ChatGPT is counting 3, 4, Joker twice - once as one of the orders if the Joker represents a 2, and once as one of the orders if it represents a 5.
gordonm888
Administrator
gordonm888
  • Threads: 62
  • Posts: 5479
Joined: Feb 18, 2015
April 26th, 2025 at 7:22:06 PM permalink
I agree with ThatDonGuy. Double counting is the bane of poker hand analysts, and ChatGPT fell into the trap.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
rackuun
rackuun
  • Threads: 0
  • Posts: 8
Joined: Jan 24, 2023
April 27th, 2025 at 11:33:49 AM permalink
Your math is right. Just wondering why you are multiplying all the hand types by 6 if the order in which the cards are drawn doesn't matter. Strictly speaking, combinations count things where order doesn't matter and permutations count things where order does matter. I believe you could simplify all your math by omitting the factor of 6.

Good luck with the game!
DJTeddyBear
DJTeddyBear
  • Threads: 213
  • Posts: 11096
Joined: Nov 2, 2009
April 28th, 2025 at 4:41:46 PM permalink
Thanks for the replies.

I'm gonna have a follow up question soon.

Quote: rackuun

... Just wondering why you are multiplying all the hand types by 6 if the order in which the cards are drawn doesn't matter. ...link to original post

Because I DO want to count every sequence of dealing. It makes certain numbers far easier to calculate.

For example, a natural three of a kind is 13 * 4 * 3 * 2: 13 ranks, 4 suits, 3 suits, 2 suits. It already accounts for every combination of dealing each rank of trips.

Additionally, "nothing" or "other" is merely the total combinations less the number of combinations of each defined hand. The easiest way to get the total combinations (which is also needed when calculating house edge), without the joker, is 52 * 51 * 50, or with the joker its 53 * 52 * 51.

Plus, because I don't trust my math (High School P&S class was a long time ago), I'm running a program to loop thru every combination, examine the results and total it up. And one of my numbers is off just a little. I'm not sure if the error is in my Excel formula or in my program. And I've been beating up both for days now trying to figure it out.
I invented a few casino games. Info: http://www.DaveMillerGaming.com/ ————————————————————————————————————— Superstitions are silly, irrational, childish rituals, born out of fear of the unknown. But how much does it cost to knock on wood? 😁
  • Jump to: