This topic is 4108 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm working on a poker game and I have code that determines the odds of your hand winning by running through every permutation of possible hands of the remaining cards in the deck and counting how many of these permutations you win against. This should tell me the odds of winning against one opponent. Assuming that this is done correctly, can I then determine the odds of winning against two opponents simply by squaring the percentage of winning against one, and cubing the percentage when up against three, etc...?

##### Share on other sites
No, you can't. Squaring will get you the probability of winning against a single opponent twice in a row. This is different from winning once against two opponents.

##### Share on other sites
It sounds like you are calculating the odds of getting the best hand against all other possibile hands, so this is independent of how many opponents there are.

Of course, in poker you have better odds of having the best hand the less players are in the game, because on average the best hand will be weaker when less hands are dealt.

The only way to calculate the true odds is to calculate all possible permutations of all cards for all players dealt in. So for hold 'em, with 2 opponents you need to calculate the possibilities for the 4 hole cards held by the players instead of just the 2 cards held by one player. That's alot more possibilities however (nearly the square of the original number of possibilities). It's going to get computationally expensive quickly unless you can precalculate (which means calculate the odds for all possible hole cards for yourself vs. the required number of players).

1. 1
2. 2
Rutin
21
3. 3
4. 4
A4L
15
5. 5
khawk
14

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633742
• Total Posts
3013634
×