Sign in to follow this  

Question about odds

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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 this post


Link to post
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).

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this