Skip to Content
 

Need math help with card hand odds.

13 replies [Last post]
Louard
Louard's picture
Offline
Joined: 02/09/2010

I'll try not to overwhelm as I explain this. I'm simply looking for help on how to figure out the odds of different card hands using custom cards.

So, first off, the cards.
4 suits, no numbers. Each card has two halves, light and dark, each half is one of the suits.
The deck has 4 of each possible combination for a total of 64 regular cards (total of 70 planned cards, but these are special and not considered)

There's a little more to it than this but essentially players will play cards from their hand (likely 5 cards) a little like rummy to try and make scoring hands.

The wrinkle is that even though there's a light and dark side to each card, when you play a hand of cards it must be all light or all dark.

So, how do I calculate the odds of possible hands so I can score them appropriately?

Possible hands would be things like 3, 4 or 5 of a kind, 1 of each, suit. 3 of one suit and 3 of another etc.

A good specific example you could try to answer is, what are the odds of getting four of a kind vs 1 of each suit?

hoywolf
hoywolf's picture
Offline
Joined: 01/27/2009
Giving it a try

So let me try this out, you have 4 different colors, let me use numbers, 1, 2, 3, and 4. and each have a light and dark side. So you have a light 1/dark 1 card, light 1/dark 2, light 1/dark 3, light 1/dark 4. So you have 4 types of light 1 cards, but you have 4 of each card, so that gives you 16 light 1 cards out of the 70 card pool.

16/70 = 0.228571429 (first light 1)
15/69 = 0.217391304 (second light 1)
14/68 = 0.205882353 (third light 1)
13/67 = 0.194029851 (forth light 1)
54/66 = 0.818181818 (anything but a light 1 card)

Then you multiple all the results together...

Four of a kind there is a 0.001624058
A normal poker hand is 0.00025

But since there are 2 sides (im not sure if this is right) but you add the product to itself because its the same odds, and its like having a second hand and seeing if you get it or not.

0.001624058+0.001624058 =0.003248116

This is my approach, anyone else please check my logic and see if im right or wrong. :p

Louard
Louard's picture
Offline
Joined: 02/09/2010
About the two sides

First of all, thanks for taking a crack at it!

For all intents and purposes, you are playing the cards as all light or all dark in trying to make a hand.. A same card could not (under normal circumstances) be used as part of two hands.

So, 0.003248116... how would that translate to a probability?

And, this is the result for a 4 of a kind.. What about 1,1,2,2? or 1,2,3,4? I assume the result won't quite be the same, no?

hulken
Offline
Joined: 04/18/2009
First of I think you can just

First of I think you can just ad the ods of the dark side to the ods of the light, becaus there is two chances of geting the "same" hand. But I am not shore of this...

Second of the ods I presume youre most intrested in, if it is a rummy type game, would be the lowest number of cards recuired to play them to a table. This du to thhat in rummy you can just a d a 4:th of a kind, ladder card and so on later with no penalty. So the ods of getting al 4:or of a card is not realy important it is the 3 of a kind ods that is importand becaus those ods a way higher.

The 1,1,2,2 or the 1,2,3,4 can you just calulate with the same method as hoywolf showed you. You devide the number of cards you want to draw with the total number of cards.

So if you want a 1,2,3,4 you have very high probability of getting the first.
64/64 = 1
the second card
48/63 = 0.76
the third card
32/62 = 0.52
the forth card
16/61 = 0.26
Gives you a total of 10,3% (20,6% if you take the dark side into account also but again I am not compleatly shore.)
But that is the ods of drawing a strait with onley 4 cards with 5 I would presume you have to calulate that you have a second chance of drawing the forth and final card needed and those chances are 16/60 = 0.27 or 27%.

So this is what you have to do for al difrent sets you want the ods for. Do you mind telling why you want the ods? If you onley want rough apoximations you can use normal scoring for poker. A pair looses to 3 of a kind and so on that is baised on the ods of difrent hands.

Also thees ods ar onley for youre starting hand ods in the game is a intirely difrent matter...

I hope I have helped and clarified things...

stubert
Offline
Joined: 01/26/2009
Just to be clear...

So,

You can only play EITHER the light sides of the cards OR the dark sides of the cards BUT NOT BOTH,

AND

EACH SUIT can appear on EITHER OR BOTH of a light side or dark side of any card?

and you are trying to find the probability, say, of having a certain hand given the fact that the hand has 2 possible ways of being played, even though the "objective" may appear only on the light side, and not on the dark side (example - you have a 4-of-a-kind with the dark side of your cards, but the corresponding light sides do not form a 4-of-a-kind)?

and you have 4 copies of each combination of each suit's light-dark combination (4 suits light * 4 suits dark * 4 copies of each card = 4x4x4 = 64 cards)?

If so, I can work this out for you (and explain it), but I would need to know that this is the set of parameters you are working in...

Louard
Louard's picture
Offline
Joined: 02/09/2010
I think so...

I'm re-reading your reply now, but I think you got it.
Yup 64 cards (70 including specials like Jokers)
Say I simply number the suits.. 1 to 4 the list of cards would go
Light 1- Dark 1
Light 1- Dark 2
Light 1- Dark 3
...etc. Until every combination of 1to4 on either light or dark is represented, x4.

There may be ambiguity in your understanding of playing a hand (and to reply to hulken, no you can't add to an already played hand like in Rummy).

Players aren't playing down hands so much as claiming objective cards from the center of the table by playing the hand represented on them. (we'll call it the cost). A player may form a hand representing the cost (like 1,1,2,2 or 1,1,1 or whatever) by either using the light side of all played cards or the dark side, but not both.

You can kind of consider the light/dark thing like having two separate hands depending on which way you hold the cards.

For the sake of clarity, I would consider a cheap objective to require a combination of 3 cards and an expensive one a combination of 5 cards. So is a 3 card objective gives you, say 1vp, how much for a 4 card one, or a 5? Should a three of a kind objective be worth more than one requiring 1,2,3,4?

hoywolf
hoywolf's picture
Offline
Joined: 01/27/2009
More Math

hoywolf wrote:
So let me try this out, you have 4 different colors, let me use numbers, 1, 2, 3, and 4. and each have a light and dark side. So you have a light 1/dark 1 card, light 1/dark 2, light 1/dark 3, light 1/dark 4. So you have 4 types of light 1 cards, but you have 4 of each card, so that gives you 16 light 1 cards out of the 70 card pool.

16/70 = 0.228571429 (first light 1)
15/69 = 0.217391304 (second light 1)
14/68 = 0.205882353 (third light 1)
13/67 = 0.194029851 (forth light 1)
54/66 = 0.818181818 (anything but a light 1 card)

Then you multiple all the results together...

Four of a kind there is a 0.001624058
A normal poker hand (4 of a kind) is 0.00025

But since there are 2 sides (im not sure if this is right) but you add the product to itself because its the same odds, and its like having a second hand and seeing if you get it or not.

0.001624058+0.001624058 =0.003248116

This is my approach, anyone else please check my logic and see if im right or wrong. :p

If you want to see the rest like 3 of a kind or pair, you can use the same formula just adjust it.
16/70 = 0.228571429 (first light 1)
15/69 = 0.217391304 (second light 1)
14/68 = 0.205882353 (third light 1)
54/67 = 0.805970149 [b](anything but a light 1 card)[/b]
53/66 = 0.803030303 (anything but a light 1 card)

Which gives you 0.006621161. Add them together = 0.013242322 (for both colors)

You can use this program or similar ones to get the fraction value, but its not in simplified.
http://www.webmath.com/dec2fract.html

Louard
Louard's picture
Offline
Joined: 02/09/2010
I'm getting a little closer to getting this, I think...

So if I divide the result for a three of a kind by the result for four of a kind I get 4.077 (rounded).. So does this mean that a four of a kind should be worth roughly 4 times the points of a three of a kind?

Also.. If I want to calculate the odds of playing a 1,2,3,4 then I do:
16/70 = 0.228571429 (light 1)
16/69 = 0.23188406 (light 2)
16/68 = 0.23529412 (light 3)
16/67 = 0.23880597 (light 4)
66/66 = 1 (anything else) <- I say this because I don't understand while your above examples state the extra cards MUST NOT be the same as the first 3 or 4

And this would give me 0.00297817
If I recalculate a four of a kind replacing the two last odds by 1/1 I get 0.001984960113645
I didn't add together to account for the dark side on either of these but in any case, it seems to point out that
You are about a third more likely to get 1,2,3,4 than you are 1,1,1,1.

The more I think about it the more I think my programmer friend's solution of writing a Monte-Carlo simulation and logging the results would be the best way to go.

Some variations I want to try involve fluctuating hand size.. which would affect the odds allot.. As would the simple fact of playing with other players who could potentially be drawing the cards you need ^_^

stubert
Offline
Joined: 01/26/2009
Argument against valuation by probability

Short answer, yes.

hoywolf had it right in his explanation. And, since what I am gathering from your other explanations, the "special" cards will most likely help equally well across the board. If this is true, you should use the raw 64-card deck as your baseline to figure relative value inherent in each card combination. Trying to scale it up to 70 cards using probabilities including special cards that carry a wide variety of "ifs" will negligibly affect the probability outcomes, and waste a lot of time.

This is a "relative" probability, however, so it is actually MUCH more like blackjack than it is like poker, which has an "absolute" probability.

If I gather this explanation, you are turning in (or discarding) cards in order to claim some objective card. The moment you draw any cards from the deck, the probability is now tainted by what you no longer have the ability to play. This means that if you happen to discard 4 light 1 cards, and they have 1-2-3-4 dark sides, the ability for you to get a 1-2-3-4 is now cut by 1/8, since there are 4 combinations for light and 4 for dark, but one of those is DEFINITELY gone with playing the 1-1-1-1 light combination. This becomes further complicated by the fact that your discarded light and dark combinations won't always line up so cleanly.

The probabilities of poker are based upon the fact that eah player gets one set of cards to make a hand out of a deck that is made complete before more probabilities are figured from it (i.e.- new hands are dealt from a full deck each time).

A possible fix to this is to have the gain from completing the objective cards relatively the same. It will shift the strain from valuating objective completion against probability toward the players' strategy toward not being limited in their endgame (ending up with cards that complete no objectives).

Sure, the benefit for putting together a certain more difficult combination should outweigh that of an easier combination, but if completing difficult combinations keeps you from ever making the easy ones at the end of the game, your opponent will likely win by making several easy combinations while you are trying to line up the more difficult ones. This is also compounded by the fact that repeated play by the same players (and you should hope that you get repeat players) will reveal this, leaving both players to avoid the more difficult combinations in favor of not being stuck with no options at the end. This will change the game to one of luck, in which the player who happens to get the right difficult card combination ends up being the victor more often than not if they can score the additional payout for combinations both players are trying to avoid.

If you valuate all card combinations relatively equally (or make multiples of each objective with heavy payout and light payout versions of each one), you should find that planning the USE OF THE CARDS IN YOUR HAND will make the game more challenging than trying to hope for a high-value, difficult-to-obtain objective.

This is just a suggestion, but additionally, you will find that with such even distributions (the number of card types exactly matches the number of times they appear in each combination) the probability of 4 of a kind is so close to 1-2-3-4 that valuing the two objectives differently is relatively moot.

The reason the probabilities vary so greatly in rummy and poker with a standard deck of cards is that the number of cards in each suit varies in a 3-to-1 ratio to the number of suits.

Louard
Louard's picture
Offline
Joined: 02/09/2010
This board rocks

Thanks to everyone who's pitched in on this.. I freakin' LOVE this board!
Stubert, you bring up some very good points. Would you agree with doing something like having all objectives cost 3 card the combination of which would simply change depending on the objective?

Another planned mechanic I didn't mention (to keep the question simpler) that will probably have yet more of an effect is the idea that series of similar objectives would form a complete quest. If a player can claim all the objectives to form the quest, he gets the bonus points for completing the quest.

stubert
Offline
Joined: 01/26/2009
Quests

No, I would stick with 3,4,5 or even 6-card combos (depending on hand size), but make the benefit for completing them relatively even (only slightly better for getting 4-of-a-kind than 3-of-a-kind). If you do not, your slippery-slope mechanic would unbalance the game too often.

For example - let us say that the chance of getting 6-of-a-kind (or a 3-3-3-2-2-1 combo, or whatever combo you chose) is 1,520,386 times LESS LIKELY than getting a 3-of-a-kind. Would you make your player get over one million more of the benefit just because he got the luck of the draw? It seems ridiculous, but when dealing with probability - it happens.

Look at the back of a "Quick Draw" lottery ticket (or review the odds for KENO - it's the same game). You will notice that getting 10 numbers right pays out $500,000 in some cases, but getting 8 numbers right pays $50,000. That's a $450,000 difference for getting 2 more numbers right. The difference between getting 1 number right and getting 3 numbers right (still only a 2-number difference)? $2.

I would make a set of payouts that are relatively balanced FIRST, and assign them to the cards in a RELATIVE way (i.e. - 4-of-a-kind is harder to get than 1-2-3, so assign it a "better" payout), not an ABSOLUTE SCALED way (as stated above - so that someone on their first turn gets $1 for playing a 3-of-a-kind and the opponent, on their first turn, gets over $1,000,000 based on their lucky hand - the game would not necessitate a second turn at that point). This will keep the game balanced and make runaways less likely.

That said, and regarding the "quest":

If there is another overall objective inherent in the game (some arc-story-driven quest), you might want to add a choice when completing smaller objectives -

help yourself (collect some payout)

or hinder the opponent (make them discard cards or even a completed objective).

You could then allow the player to do BOTH if they complete a difficult combination, as rated by the previously discussed probability valuation.

This would allow complexity and strategy for gameplay without limiting turn options, and still allow for use of the probability valuation.

Louard
Louard's picture
Offline
Joined: 02/09/2010
Ah, so...

You're suggesting scoring something like:
3 cards=1pt
4 cards=2pts
5 cards=3pts

I totally understand your example of why you simply can't use the true odds.. I would totally give up if my opponent just got a million points. ^_^

Now, I'm not saying these numbers above are best, but wouldn't this lead to players not really bothering with the harder hands?... Although, I just thought to myself how each quest having a mix of hand difficulties would help with this.. I mean, if you want that big quest bonus, you're going to have to complete the harder objectives too!

I also dig how you would have manipulating already claimed objective (called Exploits) as a player choice. I presently have it in my design as a special card (four in the deck) that, when played will allow you to steam an opponent's already claimed Exploit by also paying its cost.

Perhaps things would be interesting if the light and dark sides of the cards had the different function of allowing you to either claim an Exploit from the pool (light) or steal an exploit from an opponent (dark)! Exploits could then have a different, longer, cost for stealing.

stubert
Offline
Joined: 01/26/2009
Yep...

Yes, or even, if you think that's still unbalanced, try

3 cards = 1 pt
4 cards = 3 pts
5 cards = 6 pts

because, in addition to completing harder combinations, you're limiting further options (for each 3 five-card combos, you COULD complete 5 three-card combos).

The idea is to use the probability to create a scale, not to create a gauge. A scale is a relative rating which can be "scaled" up or down to fit a set of parameters. A gauge is an absolute reference, which tells you exactly where something is relative to something else.

Also, I like your idea of having the light/dark combos have different meanings or playability in the game. I look forward to seeing how it turns out!

Louard
Louard's picture
Offline
Joined: 02/09/2010
Thinking about it yesterday...

I came to the same point values.

The other thing I figured could be to take further inspiration from Rummy. I really like how in Rummy you are trying to get rid of your hand, but in doing so you are dwindling your options.

So, I'm considering the implications of having the game played in rounds where players attempt to empty their hands and at the end of which points are scored and each card still in hand is worth, like -2. I would also like to add the Rummy like rule by which a player can either draw one from the deck, one from the discard pile or pick up the whole discard pile.

The problem I'm having with this is the fact that in Rummy, by playing on other people's melds it's possible to play single cards out of your hand. With what I've currently got it would be impossible for a player to play less than three cards. Ideas?

Syndicate content


forum | by Dr. Radut