combinations and permutations
for example: https://wizardofodds.com/caribbeanstud
For any 10 card combination (5 for player, 5 for dealer):
there is 52*51*50*49*48 * 47*46*45*44*43*42 permutations. That's like 1 followed by 15 zeros?
surely a computer cannot generate that many, and work out what happens? That would take years?
However, one could start with the 134460 distinct starting hands for the player (using equivalence classes obtained by permuting the suits), in which case there are:
134460*combin(47,6) = 1443774065580.
This is highly doable.
--Ms. D.
0.5m rounds takes 1 second on my machine. So 33 days. Suppose the wizard's computer from 10 years ago, is 10x faster than my machine today... that is still 3 days?
Quote: newbie49How does the wizard calculate the resulting combinations/permutations?
for example: https://wizardofodds.com/caribbeanstud
For any 10 card combination (5 for player, 5 for dealer):
there is 52*51*50*49*48 * 47*46*45*44*43*42 permutations. That's like 1 followed by 15 zeros?
surely a computer cannot generate that many, and work out what happens? That would take years?
Nah, not nearly that long. First, you have 11 terms, and second, you didn't take the combinations into account. I have a blackjack sim running on my notebook (not at all a high-end machine) that gets through 1M random hands per second. At that rate, you're only looking at a month and a half, but it won't take that long. There are algorithmic ways to speed things up, and you're not doing a random sim (random selection is *really* expensive compared to sequential selection / iteration). Even if you do all 52c5 * 47c5 by brute force, that's 4T combinations or so, and a good algorithm on a good computer could get through those in a few days, maybe a week or two. Not years.
[edit. sorry, just reread your post]Quote: newbie49hmm 1,443,774,065,580
0.5m rounds takes 1 second on my machine. So 33 days. Suppose the wizard's computer from 10 years ago, is 10x faster than my machine today... that is still 3 days?
Look up "Catus Kev". Those libraries are easy to implement for problems like this. Mr. W. has similar.
Here is a benchmark I just ran for evaluating 5 card poker hands:
Hands evaluated: 1000000000
Total microseconds: 12957484
One billion hands in 12.96 seconds ...
77.16M hands per second ...
--Ms. D.
Good algorithm?Quote: MathExtremistEven if you do all 52c5 * 47c5 by brute force, that's 4T combinations or so, and a good algorithm on a good computer could get through those in a few days, maybe a week or two. Not years.
As I showed in my last post, I can do 77.16M per second (and my computer is 18 months old ...). So that gives about 100.5 hours for the full combin(52,5)*combin(47,6). I guess that's a few days ... ok.
Using the equivalence classes I pointed out in my previous post, it's about 5.2 hours to run a full cycle on Caribbean Stud.
--Ms. D.
As mentioned, there are only 134,459 unique player hands, bringing the total number of unique combinations down to 1,031,259,520,005. It would even be possible to further simplify the number of dealer upcards, and combinations of 4 remaining cards, but the effort involved in figuring that out would significantly outweigh the benefit.
My Caribbean Stud analyzer takes less than 1 second to analyze a paytable completely and accurately. It relies on a 31MB binary data file (which took about 6 hours to populate, but only needed to be done once). If anyone is interested, I would be happy to share the technical details.
Join the discussion
Log in or create a free account to reply to this thread.

