🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Holdem Poker Preflop Odds

Started by
4 comments, last by The Reindeer Effect 18 years, 11 months ago
I'm writing a no limit texas hold'em AI. At the moment, I am trying to produce a table of preflop odds to use as a basis for determining whether to fold/bet/call before the flop comes down. Here's what I do: For each of the 388 possible starting hands, I do the following N times: 1. Deal an opponent a 2 card hand. 2. Deal a 5 card flop. 3. See who wins 4. Keep track of how many times my hand wins. Then I divide the wins by N to get the winning expectation of the hand (assuming play against one opponent, to the river). With high N, I should get a good approximation. Here's what I got: Do these expectations look about right? I can't find a similar chart online. The rankings of the hands look ok to me (AA is best, suited hands better than unsuited). But the expectations look a little off (I thought AA was 74% of winning). Also all poker books say that AKs is better than JJ, TT, 99, 88 and 77. Which is not the case here. How can I figure out what N (the number of sampled hands) to get a good statistical sampling? Like if I want to say that with 95% confidence, my ordering of how good a preflop hand is is correct? Also, if I want to extrapolate for multiple opponents, can I legitimately do that with this data? My idea was that if the expectation of beating one opponent is E for a specific hand, the expectation of beating two opponents with that hand would be E^2. Then a primitive algorithm for deciding preflop whether or not to stay in on a hand would be: Let P = #players STAY IN if(E^(P-1) > 1/P) That is, if our chances of winning are better than average. Of course, you could (and probably should) have some randomness in here or a constant to tune tightness/looseness of play. Would love to hear comments on any of this!

Shedletsky's Bits: A Blog | ROBLOX | Twitter
Time held me green and dying
Though I sang in my chains like the sea...

Advertisement
Hmmm. This may or may not help at all. Charles Bloom (of Oddworld fame) has posted some fairly extensive ideas and theories on poker, including Hold'Em:

Charles Bloom's Poker Page

Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Quote: Original post by Telamon
Do these expectations look about right? I can't find a similar chart online. The rankings of the hands look ok to me (AA is best, suited hands better than unsuited). But the expectations look a little off (I thought AA was 74% of winning). Also all poker books say that AKs is better than JJ, TT, 99, 88 and 77. Which is not the case here.

The figures seem to be correct to me. I ran i quick test and got the same numbers to within the margin of error. Don't know how poker books rank hands though.

Quote: Original post by Telamon
How can I figure out what N (the number of sampled hands) to get a good statistical sampling? Like if I want to say that with 95% confidence, my ordering of how good a preflop hand is is correct?

Roughly speaking, you will get an error of about 1/sqrt(N), so if N=10000, you will get en error of about 0.01. (It is easy to test and see what happens when you run the program several times. How much do the results change from time to time?)

Quote: Original post by Telamon
Also, if I want to extrapolate for multiple opponents, can I legitimately do that with this data? My idea was that if the expectation of beating one opponent is E for a specific hand, the expectation of beating two opponents with that hand would be E^2.

It will probably give you a fair approximation in most cases, but it is not completely accurate, since the hands of the opponents are not independent. Also it would be quite simple for you to run the test for a different number of opponents.
Quote:
Quote: Original post by Telamon
Also, if I want to extrapolate for multiple opponents, can I legitimately do that with this data? My idea was that if the expectation of beating one opponent is E for a specific hand, the expectation of beating two opponents with that hand would be E^2.

It will probably give you a fair approximation in most cases, but it is not completely accurate, since the hands of the opponents are not independent. Also it would be quite simple for you to run the test for a different number of opponents.


After thinking about it, you're right - the hands of multiple opponents are not independent. Error introduced by this is really small though, right? Because the chances of someone else having one's outs versus the outs still being in the deck are small. Where would this error be most manifest? With pocket pairs (which have fewer outs)? Can I simply apply a correction term? What would it be?

Shedletsky's Bits: A Blog | ROBLOX | Twitter
Time held me green and dying
Though I sang in my chains like the sea...

Quote: Original post by Telamon
After thinking about it, you're right - the hands of multiple opponents are not independent. Error introduced by this is really small though, right? Because the chances of someone else having one's outs versus the outs still being in the deck are small. Where would this error be most manifest? With pocket pairs (which have fewer outs)? Can I simply apply a correction term? What would it be?

As a matter of fact, since all players share the same community cards, I expect the dependence to be quite strong. Probably more so when you have two lousy cards to begin with, but I would have to think a bit more on that... I don't know if or how a correction term could be applied to this problem. Personally, I would definitely go safe and simple on this one and use precalculated values for all number of opponents, rather than messing with some error estimates I'm not really sure is correct.
Ok, well one thing that I believe Bloom does and I know that Poki does is that for these simulation tables, they iterate a number of times where each time the opponent only bets if their cards are over a certain value threshold (in Poki's case, there was a cooling factor added, but this isn't absolutely necessary).

So for example, 72o would score low enough that the next time around, you assume the person wont play it. This is basically a dumb approach at getting more accurate payout values.

Edit: To be more specific, the results of the prior iteration are used to define a basic "bet/fold" AI for the opponent.

[Edited by - The Reindeer Effect on July 15, 2005 5:10:24 PM]

This topic is closed to new replies.

Advertisement