Friday, August 2, 2013

Dave Computes Playing No-Limit Poker against an All-In Maniac

You're heads-up (or may as well be) in a no-limit poker game against a maniac who goes all-in every hand.  How often should you call him down?

This scenario is quite common in play-chip poker games, where no money is on the line.  Clearly we should be able to exploit the maniac's play, and we can.

I wrote a computer simulation of poker games like this, beginning with various stack sizes and using various betting and calling thresholds.  In each scenario, I simulated 100,000 games in which one player eventually ran out of chips.  Here's what I learned.

Stack sizes make a big difference in correct calling frequency.  In particular, what really counts is the size of the smaller stack relative to the size of the ante.
Size Of Smaller StackOptimal Calling %Sample Hold'em HandsCaller Win %
100 × ante7%77, AK, ATs95%
50 × ante10%66, AT, KJs92%
20 × ante23%K9, K7s, A584%
10 × ante34%A2, K4s, K674%
5 × ante55%J3s, Q3, 87s63%
2 × ante76%T3, 92s, 7653%
against a maniac who goes all-in 100% of the time

In other words, if one of you has a stack size of 50 times the ante and the other has a larger stack, then you should call down the constant-all-in-maniac 10% of the time (which corresponds to hands like 66, AT, and KJs in Hold'em), and you can expect to finish with all the chips 92% of the time.  For me, the real take-home point here is not to loosen up too much when the stack sizes are big.

What if the maniac "only" goes all-in half of the time (and folds the other half)?  Here's what my simulation found for that scenario.

Size Of Smaller StackOptimal Calling %Sample Hold'em HandsCaller Win %
100 × ante1%AA, KK99%
50 × ante1%AA, KK98%
20 × ante5%77, AQs, AJs95%
10 × ante10%66, AT, KJs90%
5 × ante17%A8, KT, A6s81%
2 × ante34%A2, K4s, K669%
against a maniac who goes all-in 50% of the time

Not surprisingly, when the maniac tightens up, so do we.  But notice we should now play much tighter against the 50% maniac than we did against the 100% maniac.  In a Hold'em game with stack sizes of just 50 times the ante, the maniac is raising hands as poor as J5s, and we're correct in folding QQ!  Why?  Because the simulation tells us so, presumably because our stack size (along with the 50% of the time that the maniac folds his ante to us) lets us wait for a nearly sure-thing with AA or KK, rather than risk going bankrupt with an unlucky loss with QQ.

How about if the maniac goes all-in with just 20% of his hands (and folds the rest)?  Now even a stack size of just 5 times the ante is sufficient to let us call with only the top 1% of hands.

Of course, many all-in maniacs will limp into a hand instead of folding, so these aren't very realistic scenarios.  Nonetheless, it's clear that when your opponents are making disproportionately huge raises and going all-in after tiny pots, your best strategy is to be patient with your large stack and play tight, knowing that your opponents will pay you off when you make huge hands.

Wednesday, July 31, 2013

Dave Computes The Feinberg Formulas for Hold'Em Poker Starting Hands

Part 1:  Ranking Starting Hands

How can we memorize which Hold'em starting hands to play?  Our first problem lies in ranking all 169 possible starting hands.  I did this in an earlier post, and showed that the ranking depends quite a bit on how many players are in the hand.  In the chart below, you can see the ranking of starting hands for a heads-up game, a 3-player game (in which all 3 showdown every hand), etc.  My interpretation is that the 3Way column (for example) is appropriate for any game in which we expect 3 players to see the flop, regardless of how many people were dealt in and how many stay for the showdown.


The Avg column ranks hands using a weighted average of the value of that hand in different sized games, with 50% of the weight given to a hand's value in a 2-way flop, 25% in a 3-way flop, 12.5% in a 4-way flop, etc.  I think of it as a correction to the 2Way column, where hands that weaken with more players (like 77) are pushed down the list, while hands that become stronger with multiple players (like KJs) move up.

Our challenge now is to find a formula that helps us memorize the ranking of the most commonly played hands (especially the top third).  I considered more formulas than I care to admit.  I'll present the best two of these below.  Both are very faithful to my hand ranking.  The "Simple Feinberg Formula" boasts a very simple rule, but can be difficult to use in practice.  The "Easy Feinberg Formula" requires a small effort to memorize, but is extremely easy to apply.


Part 2:  The Simple Feinberg Formula
In this formula, A = 14, K = 13, Q = 12, J = 11, T = 10, 9 = 9, and so on.  We simply triple the high card, add the kicker, add 3 if suited, and add the number of possible straights (using both cards), as illustrated by the following examples.

KJ:  3 × 13 (high) + 11 (kicker) + 2 (straights) = 52
A7s:  3 × 14 (high) + 7 (kicker) + 3 (suited) = 52
K9s:  3 × 13 (high) + 9 (kicker) + 3 (suited) + 1 (straights) = 52
QTs:  3 × 12 (high) + 10 (kicker) + 3 (suited) + 3 (straights) = 52

These hands have the same score because they're about equally strong in my ranking.  For a pocket pair, triple the value and add 34.

66:  3 × 6 + 34 = 52

Let's see the results.


So, if in a certain preflop situation you felt you ought to raise 14% of the time, you could raise any hand with a score of 52 or higher.  (See my earlier post for a discussion of how often to raise preflop.)

This formula exactly reproduces the top 50 hands in my ranking.  (In fact, the formula makes only 4 "mistakes" in ranking the top 60 hands, which can be corrected by adding 1 point to the scores of 55, 44, JT, and T9s.)  The formula is granular enough that you can adjust your play to your exact position.

Ok, so the scores are rather high, which makes it difficult to perform the necessary mental math quickly.  But I claim it's easier than it looks.  In most situations, a quick estimate is enough to decide whether to enter a hand.  You probably already recognize premium hands like 99, AQs, and AK and trash hands (nearly anything with a high card below a jack), so you can skip the math on these.

I find the fastest way to perform the calculation is to start with the high card, then add 1 if it's suited, then triple this result, then add the kicker, and finally add the number of straights.  You'll quickly discover that the same numbers come up all the time:

AXs = (14 + 1) × 3 =  45
AXo = KXs = 14 × 3 = 42
KXo = QXs = 13 × 3 = 39
QXo = JXs = 12 × 3 = 36

Once you know these, the math gets much easier.  Another key is to stop calculating as soon as the score passes the desired threshold (or clearly won't get there).  This way you won't have to determine the number of possible straights often.

If you'd prefer to work with smaller numbers, you can reduce the card values without affecting relative card rankings.  For example, you might use A=4, K=3, Q=2, J=1, T=0, etc., for the high card (but this requires using negative numbers for hands like 98s).

The Simple Feinberg Formula distributes the top 50% of starting hands into more than 20 hand groups.  That sounds great, and it is if you can take advantage of this in your play.  But you might not want to memorize a different strategy for each group.  The solution is to bundle multiple scores into larger groups.

A simple approach is to round all scores to the nearest multiple of 3 (for example).  50, 51, and 52 would all round to 51, and would therefore all be played the same way.  The good news is that this means there's no need to triple in the first place.  We could simply add the kicker and number of straights, divide by 3 and round to the nearest integer, then add the high card and 1 more if suited.  Now the numbers are smaller, but they're not really any easier to compute.  The bad news is that there are good reasons for treating scores of 50, 51, and 52 differently.

A better solution is to group scores into more meaningful ranges.  Suppose you consider 41 to be a reasonable threshold for raising heads-up, 47 for raising on the button, and 50 for raising from the cut-off.  Now you've got a few hand groups:  the 40-and-less group, the 41-46 group, the 47-49 group, and the 50 group.  Of course, this approach would require memorizing the numbers 41, 47, and 50, along with how to play such hands.  There must be an easier way...


Part 3:  The Easy Feinberg Formula
Although many people treat all small pocket pairs (66 - 22) the same, we see from our hand ranking that there are surprisingly large differences between the values of these hands.


The Simple Feinberg Formula above asked us to triple pair values, triple high values, and add 3 for suited hands.  That leads us to the following key observation.  If K8 (a top 30% hand) is about as strong as 44, then A8 (like K8, but with a higher top card) and K8s (like K8, but suited) should be about as strong as 55 (the next pair up).  In practice, this trick works impressively well.  For that reason, the Easy Feinberg Formula groups hands into "plays like 55," "plays like 66," etc.  (The strange kicker values in the Easy Feinberg Formula have been determined empirically, with the goal of faithfully producing the above hand rankings.)

Rule #1:  The value of pocket pair XX is X.
 Examples:  The value of 66 is 6.  The value of KK is 13.
Rule #2:  High card values are 3 for Ax, 2 for Kx, and 1 for Qx.  All other high cards are worth 0. 

Rule #3:  Kicker values are:
5 for xK
4 for xQ, xJ, xT
3 for x9
2 for x8, x7
1 for x6, x5, x4, x3
0 for x2
Examples:
AK = 3 (Ax) + 5 (xK) = 8
A2 = 3 (Ax) + 0 (x2) = 3
Q8 = 1 (Qx) + 2 (x8) = 3
T9 = 0 (Tx) + 3 (x9) = 3
Rule #4:  Add 1 if suited.
KQs = 2 (Kx) + 4 (xQ) + 1 (suited) = 7
J3s = 0 (Jx) + 1 (x3) + 1 (suited) = 2
If you can will yourself to memorize the kicker values, the payoff is a formula that's easy to apply and gives the following results, which again are quite faithful to the hand ranking shown earlier.


So, if in a certain preflop situation you felt you ought to raise 15% of the time, you could raise any hand with a score of 6 or higher.  An easy (but simplistic) rule might be to play 3+ from the blinds (and heads-up), 4+ from the button, 5+ from 1-off-the-button, and 6+ from 2-off-the-button.  Note that it's roughly the case that raising your score threshold by 2 will halve your play frequency.  So, if you believe someone would raise with a score of 4+, you might reraise them with a score of 6+.

Tuesday, July 9, 2013

Dave Computes Poker Play Frequencies

A super-important problem in poker is determining whether your poker hand is likely to be the best at the table, without knowing what your opponents hold.  In this post, I'll assume that you know absolutely nothing about your opponents' hands, but you know the exact value of your own hand.

For example, suppose you're one of 3 players in a Hold'em poker game.  You expect to have the best hand about 33% of the time.  Suppose you hold K7o preflop and you're first to act (on the button).  Using the spreadsheet I made available in an earlier post, you see that only 32% of all possible hands are more likely to win than your K7o.  I'll therefore refer to K7o as a 32% hand.  Since this is less than 33%, you might assume you have a better-than-even chance of holding the best hand.  Are you correct?  No.  Let's see why.

There is a 68% chance (100% - 32%) that your K7o will beat any single opponent.  That means there's a 0.68 * 0.68 = 46% chance that your hand is better than both of your opponents', and a 54% chance that it isn't.  How strong must your hand be to have a 50% chance of beating both?

Let p be the probability that a single opponent's hand will beat yours.  (In the case of K7o, p = 0.32.)  Then the probability of beating a single opponent is (1 - p).  The probability of beating both opponents is (1 - p)2.  Now set this equal to 0.5 and solve for p.

(1 - p)2 = 0.5
p = 1 - (0.5)1/2 = 29.29%

What does that mean for our poker play?  It means we can't raise a K7o for value in this situation, because there's a 54% chance we're just giving that money away to an opponent.  Actually, the situation is not so straightforward.  If I'm on the button, I'll be last to act on all remaining rounds, giving me an edge that probably brings my chances of winning the hand closer to 50%.  (There are a lot of other subtleties to consider here, too.  If both opponents will call me down no matter what, then I have enough pot equity with my better-than-33% hand to raise for value.  However, in a 3-way hand, my K7o goes down in value and is now beaten by 36% of possible hands.)

So, it is reasonable to raise a top-29.29% hand for value in a 3-player game.  Solving
(1 - p)3 = 0.5, we find that it's reasonable to raise a top-20.63% for value in a 4-player game.  Note that this reasoning holds for any poker game.  But you can only apply it when you know the exact value of your hand, as you might in Hold'em preflop play.

Suppose we're on the button in a 4-player Hold'em game, and the first player folds.  Now we're effectively in a 3-player game, so we can raise a 29.29% hand for value.  This explains much of why your position changes the number of hands you can play.  (By the way, my math has convinced me that you should nearly always open with a raise in a game of hold'em.  I rarely open by calling.  When someone does limp ahead of me, I'm more likely to limp in with hands I might have opened with a raise.)

In general, in an n-player game, we can find this threshold by solving (1 - p)n - 1 = 0.5 for p.

p = 1 - 0.51/(n - 1)

Here's what we find.

Number Of PlayersThreshold
250.00%
329.29%
420.63%
515.91%

Now, suppose you're in a 5-player game of Hold'em.  The player under the gun opens with a raise (which we'll assume is not particularly monstrous).  The next player folds.  You're on the button.  You believe that raiser must have a top-15.91% hand.  You have ATo--a 9.5% hand with one opponent.  Do you reraise?  If we ignore the fact that you have position on the raiser, you should fold.  Why?  Because your opponent holds a 15.91% hand or better--anything from A8o to AA.  More than half of those hands are stronger than your ATo.  To raise, your hand must be in the top 15.91% / 2 = 7.96%.  So, you could raise a KQs (7.84%) or AJo (7.54%), but should fold ATo.

Now suppose you're the original raiser and the player on the button reraises you with what you assume to be a top-7.96% hand.  Using the same logic (and still ignoring position), you should reraise them back (potentially capping or putting yourself all-in at this point) with a top-3.98% hand (7.96% / 2) like 77 or AKs, but should probably call otherwise.

Number Of PlayersRaiseReraiseCap
250.00% (J5s)25.00% (QTo)12.50% (A7s)
329.29% (J9s)14.64% (QJs)7.32% (AQo)
420.63% (A3s)10.31% (A8s)5.16% (AJs)
515.91% (A8o)7.96% (KQs)3.98% (77)
612.94% (A9o)6.47% (ATs)3.24% (88)
710.91% (KTs)5.46% (AKo)2.73% (99)
89.43% (66)4.71% (AJs)2.36% (TT)
98.30% (A9s)4.15% (77)2.07% (JJ)
107.41% (AQo)3.71% (AKs)1.85% (JJ)

These playing frequencies turn out to be fairly close to those suggested by successful poker players.

Let's use this table to work through one more example.  If you're the first to act among 6 players, then you can raise your top-12.94% hands (ignoring position again), which would be A9o or better in a tight game.  If you're reraised, you can expect your opponent to hold a top-6.47% hand (ATs or better), and you can therefore raise them back with a top 3.24% hand (88 or better).  Note again that we're not taking position into account or, more importantly, the playing styles of your opponents.

Incidentally, if you look at preflop Hold'em play in this way, you're not stealing the blinds--you're raising for value.

All of this begs the question:  How can I determine the strength of my hole cards without constantly turning to a spreadsheet?  I'll address this in my next post.