Set and Run Probability without Mathematics

4 replies [Last post]
MatthewF
Offline
Joined: 07/22/2008

I'm working on a game that uses numbered cards that the players lay down as sets and runs. Though my best guess as to rough probabilities seems to work out in playtesting, I've decided to try to figure out more accurate probabilities since it would likely take thousands of playtests and lots of good observation to be as precise as I'd like.

I know that the part of math called combinatorics can accurately calculate what I need, but I'm not good with it and after a bunch of research, have concluded that it will take me way, way longer to figure out the odds that way than by simply writing a 20-minute computer program to simulate a few million hands and go with what it figures out for the odds.

However, I'm wanting to make sure I'm figuring out the right thing, so here's a simple example:

A Set is two or more cards of the same rank (number) of any suit. I'm creating a deck of cards and then drawing randomized sets of 7-card hands from them. Let's say that I draw the following (numbers are rank, letters are suits):

1c 3a 3b 3c 3d 5b 7d

Looking at it, I see a set of four (the 3s). What I'm trying to figure out is what else I have. I'm pretty sure that I have another set of three and two sets of two. That is, that I don't need to count every combination because I can't actually play all of those combinations.

By "combinations" I mean that I don't in fact have a whole bunch of sets of three like this:

3a 3b 3c
3a 3b 3d
3a 3c 3d
3b 3c 3d

There aren't actually four sets of three in my hand, just one, right?

Here's what I'm working towards, if it helps: what are the odds of a Set of 2, of 3, 4, 5, 6, and 7, and what are the odds of a Run (two or more cards with the same suit and ranks in numerical order, like 2a 3a 4a 5a) of 2, of 3, 4, 5, 6, and 7.

I'm almost positive I don't have to count all the possible combinations in a given hand since there really is only one play of a three-card set in the above example, but I want to make certain. Any help is appreciated.

seo
Offline
Joined: 07/21/2008

I noticed you didn't mention how many cards there are in your deck, what are the values, how many suits, etc. Maybe if you do, some generous person, versed in probability, might give you the answer to your questions. Sadly, I am not the right person, but if there is one around, it would help to know your deck better.

Zzzzz
Offline
Joined: 06/20/2008
What is the total number of

What is the total number of cards in the deck?

What is the breakdown of cards per suite?

Are there duplicate cards (same suite/value)?

fecundity
Offline
Joined: 07/28/2008
The natural way to estimate

The natural way to estimate the probabilities with a computer program is to initialize an empty array with N elements, where N is the number of ranks. Then generate a random hand of cards. Go through the hand one card at a time, and increment the Jth element of the array when you reach a card of rank J. When you are done, look to see if any of the elements are greater than one. In your example, the 3rd element of the array will be 4 when you've gone through the hand. This avoids counting the four-of-a-kind as any smaller combo.

Record whatever sets were in the hand. Reinitialize the array and generate a new hand. Repeat for many, many hands.

If you want help with the mathematical, analytic solution, rather than the computational, brute force solution, you'll need to tell us more about the structure of the deck. But the computational approach should give you enough precision.

MatthewF
Offline
Joined: 07/22/2008
Thanks