Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does software that calculates winning probability of a Texas Hold'em or Omaha hand against 8 random opponent hands work?

So there are Texas Hold'em computer games where you play up to 8 opponents and supposedly some of these computer games tell you your probability of winning assuming your opponents hands are all random. In case someone doesn't know, in Hold'em each player is dealt 2 private cards and then eventually 5 community cards are dealt in the middle (first 3, then 1, then 1 more), and the winner is the player who can make the best 5 card poker hand they can using any combination of their 2 private cards and the 5 community cards. In Omaha, each player is dealt 4 private cards and there are still 5 community cards and the winner is the player who can make the best 5 card poker hand using 2 private cards and 3 community cards.

So, in Hold'em, for any given player's private hand, there are over 10^24 ways that 8 opponents' private hands and the 5 community cards could be dealt. So how do they calculate/estimate your probability of you winning in the beginning, assuming your 8 opponents' hands are random? In Omaha the situation is even worse although I've never seen an Omaha computer game that actually gives you your odds against 8 random opponents' hands. But anyway, are there any programming tricks that can get these winning probability calculations done (or say, correct within 3 or 4 decimal places), faster than brute force? I'm hoping someone can answer here who's written such a program before that runs fast enough, hence why I'm asking here. And I'm hoping the answer doesn't involve random sampling estimation, because there's always a small chance that could be way off.

like image 854
user2566092 Avatar asked Oct 22 '14 19:10

user2566092


People also ask

Can you use probability in poker?

Each of the 2,598,960 possible hands of poker is equally likely when dealt 5 cards from a standard poker deck. Because of this, one can use probability by outcomes to compute the probabilities of each classification of poker hand. The binomial coefficient can be used to calculate certain combinations of cards.

How many straight flushes all five cards have the same suit and all in numerical order are possible in poker?

A hand that is a flush must consist of all five cards being of the same suit. Each of the four suits has 13C5 = 1287 possible five-card hands that are all of the same suit.

How many ways are there to get a straight flush?

A Straight Flush consists of 5 consecutive cards in the same suit and may have a high card of 5, 6, 7, 8, 9, 10, Jack, Queen, King, or Ace for a total of 10 different ranks. Each of these may be in any of 4 suits. Thus there are 40 possible Straight Flushes.


1 Answers

As you identified the expected win rate is an intractably large summation and must be approximated. The standard approach is to use the Monte Carlo method which involves simulating various hands over and over and taking the empirical average: #wins/#games.

Interestingly, the (MSE) error of this approximation approach is independent of the dimensionality (number of combinations) specifically, letting X = 1 if you win, 0 if you lose, MSE = var(X)/N = p*(1-p)/N where p = Prob(X=1) (unknown), and N is the number of samples.

There are a whole host of different Monte Carlo techniques that can improve the variance of the vanilla sampling approach, such as importance sampling, common random numbers, Rao-Blackwellization, control variates, and stratified sampling to name only a few.

edit: just saw you are looking for a non-random approximation approach, I doubt you will have much luck with deterministic approximations approaches, I know that the current state of the art in compute poker research uses Monte Carlo methods to compute these probabilities, albeit with several variance-reduction tricks.

Regarding "because there's always a small chance that could be way off" you can always get a high probability bound on the error rate with Hoeffding's inequality.

like image 173
fairidox Avatar answered Oct 29 '22 15:10

fairidox