Two Plus Two Poker Forums Recursive 2 street equity formula
 Register FAQ Search Today's Posts Mark Forums Read Video Directory TwoPlusTwo.com

 Notices

 Poker Theory General poker theory

 06-03-2012, 05:41 AM #1 adept   Join Date: Jan 2006 Posts: 702 Recursive 2 street equity formula The normal exact formula for computing equity P after the flop with 2 cards to come given x outs and 47 unseen cards is: Px = (93 - x)*x/21.62I came up with a recursive formula that computes the next value if you know the previous 2 values i.e. Pz is computed given Px and Py: Pz ≈ Py - Px + Py - .09So if you know that P8 ≈ 31.45 and P9 ≈ 34.97, then: P10 ≈ 34.97 - 31.45 + 34.97 - .09 ≈ 38.40Which is off by less 0.01% If you continue the recursion to compute successive values, the error accumulates and it becomes less and less accurate. Beginning with P0 = 0 and P1 ≈ 4.26, will produce the following results: Code: ```Outs Approx Equity Error 0 0.00 0.00 0.00 1 4.26 4.26 0.00 2 8.43 8.42 0.01 3 12.51 12.49 0.02 4 16.50 16.47 0.03 5 20.40 20.35 0.05 6 24.21 24.14 0.07 7 27.93 27.84 0.09 8 31.56 31.45 0.11 9 35.10 34.97 0.13 10 38.55 38.39 0.16 11 41.91 41.72 0.19 12 45.18 44.96 0.22 13 48.36 48.10 0.26 14 51.45 51.16 0.29 15 54.45 54.12 0.33 16 57.36 56.98 0.38 17 60.18 59.76 0.42 18 62.91 62.44 0.47 19 65.55 65.03 0.52 20 68.10 67.53 0.57``` If you replace the approximate .09 constant with the more accurate approximate constant .0925, then you get the following: Code: ```Outs Approx Equity Error 0 0.00 0.00 0.00 1 4.26 4.26 0.00 2 8.43 8.42 0.01 3 12.50 12.49 0.01 4 16.48 16.47 0.02 5 20.37 20.35 0.02 6 24.17 24.14 0.03 7 27.88 27.84 0.03 8 31.49 31.45 0.04 9 35.01 34.97 0.04 10 38.44 38.39 0.05 11 41.77 41.72 0.05 12 45.01 44.96 0.06 13 48.16 48.10 0.06 14 51.22 51.16 0.07 15 54.19 54.12 0.07 16 57.06 56.98 0.08 17 59.84 59.76 0.08 18 62.53 62.44 0.09 19 65.12 65.03 0.09 20 67.62 67.53 0.09``` Now we are accurate to within 0.1%. Not bad for just a couple of additions and a couple of subtractions for each iteration. Another way of reducing the error is by memorizing just 2 or 3 key pairs of values, so that you are not extrapolating too far. A nice property of the formula is that it can be used to go backward too. Just swap Px with Pz as follows: Px ≈ Py - Pz + Py - .09For example, with P8 ≈ 31.45 and P9 ≈ 34.97, we can compute: P7 ≈ 31.45 - 34.97 + 31.45 - .09 ≈ 27.84The normal exact formula gives the same result when rounded to 2 decimal places. By going both forward and backward and not just forward, how far you need to extrapolate gets cut in half producing even more accuracy. Using all the tricks, you can get quite good results using numbers accurate to a tenth of a percent instead of working with numbers accurate to a hundreth of a percent. BTW, even though it is presented as an approximation, it can be made to be exact by starting with exact values and replacing the approximate constant .0925 with the exact 1/10.81. Exact in theory at least. In practice, YMMV. This is something I came up with just today. I thought I'd post it in case anyone might interested in fiddling around with it. Despite my original intent, I don't think I'll be using this when I play poker. The more usual approximations are good enough and I'm used to using them.
06-03-2012, 10:08 AM   #2
Carpal \'Tunnel

Join Date: Feb 2006
Location: Austin, TX
Posts: 14,951
Re: Recursive 2 street equity formula

Quote:
 Pz ≈ Py - Px + Py - .09
This is probably more simply stated as
Pz ≈ 2*Py - Px- .09

But my main question is... what would you use this for? It's not easier in a real-time estimating context and it's not easier or better offline with a calculator or a program, so...

06-03-2012, 01:18 PM   #3

Join Date: Jan 2006
Posts: 702
Re: Recursive 2 street equity formula

Quote:
 Originally Posted by RustyBrooks This is probably more simply stated as Pz ≈ 2*Py - Px- .09 But my main question is... what would you use this for? It's not easier in a real-time estimating context and it's not easier or better offline with a calculator or a program, so...
Quote:
 This is something I came up with just today. I thought I'd post it in case anyone might interested in fiddling around with it. Despite my original intent, I don't think I'll be using this when I play poker. The more usual approximations are good enough and I'm used to using them.
One of my pet projects is figuring out how to calculate HU poker equities in my head accurately to the nearest half of a percent after the flop. This is a project I already completed by other means, but I still revisit the issue from time to time. It's a Mount Everest type of thing. I do it, because it's there. And along the way I learned a lot of interesting math stuff.

As for practical value, this type of idea can be generalized for any nth degree polynomial and used as a speed optimization in certain programming contexts. With a little modification, you can replace the computing of n multiplications and n additions used to evaluate a polynomial within a loop with just n additions. But this is off-topic for this forum.

 06-03-2012, 03:54 PM #4 Carpal \'Tunnel     Join Date: Feb 2006 Location: Austin, TX Posts: 14,951 Re: Recursive 2 street equity formula OK, that's fine. As I've often stated this forum is about theory. I was just wondering if there was some application I'd missed. The N adds instead of N adds and N multiplications is interesting but I think it would only be at the extreme limits that it would really be that helpful. Computers multiply pretty good, and the table only needs to be generated once.
06-08-2012, 05:46 AM   #5
grinder

Join Date: Dec 2010
Posts: 595
Re: Recursive 2 street equity formula

Quote:
 Originally Posted by R Gibert One of my pet projects is figuring out how to calculate HU poker equities in my head accurately to the nearest half of a percent after the flop. This is a project I already completed by other means, but I still revisit the issue from time to time. It's a Mount Everest type of thing. I do it, because it's there. And along the way I learned a lot of interesting math stuff. As for practical value, this type of idea can be generalized for any nth degree polynomial and used as a speed optimization in certain programming contexts. With a little modification, you can replace the computing of n multiplications and n additions used to evaluate a polynomial within a loop with just n additions. But this is off-topic for this forum.
It looks like the value in the denominator should be 2162 instead of 21,62. http://en.wikipedia.org/wiki/Poker_p....E2.80.93_outs.

Out of curiosity did you use Eureqa for this project?
I was thinking you could do this by feeding Eureqa with a series of values taken from the real formula and have it figure out an approximation using as building blocks just additions and subtractions.

Does your method allow you to approximate equities in your head with that accuracy and speed so it can be used at the tables?

06-08-2012, 12:07 PM   #6

Join Date: Jan 2006
Posts: 702
Re: Recursive 2 street equity formula

Quote:
 Originally Posted by erdnase17 It looks like the value in the denominator should be 2162 instead of 21,62. http://en.wikipedia.org/wiki/Poker_p....E2.80.93_outs. Out of curiosity did you use Eureqa for this project? I was thinking you could do this by feeding Eureqa with a series of values taken from the real formula and have it figure out an approximation using as building blocks just additions and subtractions. Does your method allow you to approximate equities in your head with that accuracy and speed so it can be used at the tables?
21.62 is used instead of 2162 merely because it generates numbers in percent i.e. 0 to 100 instead of probabilities in the range 0 to 1.

I derived this algebraically and tested with Python. I did not use Eureqa. At it's basis, it is an exact method as noted in my OP.

Py ≈ (Px + Pz )/2 + Ki

You start with the probabilities for 0 outs and 16 outs, which is 0.0% and 57.0% respectively when rounding to the nearest 0.1%. The Ki begins with the value 3.0 and each successive iteration drops it down to 0.7, 0.2, then 0.0. Using this scheme produces the following results when working to an accuracy of 0.1%:
Code:
```Outs Approx Equity Error
1     4.2    4.3   -0.1
2     8.4    8.4   -0.0
3    12.4   12.5   -0.1
4    16.5   16.5   +0.0
5    20.4   20.4   +0.0
6    24.2   24.1   +0.1
7    27.9   27.8   +0.1
8    31.5   31.5   +0.0
9    35.0   35.0   +0.0
10    38.4   38.4   +0.0
11    41.7   41.7   +0.0
12    44.9   45.0   -0.1
13    48.1   48.1   +0.0
14    51.2   51.2   +0.0
15    54.1   54.1   +0.0```
Which is quite good. I figured out that if you memorize the ones for 0,4,8,12,16 outs, you average 1.25 iterations of the algorithm doing at most 2 iterations. This assumes each value is equally likely.

I've tested it out, by carrying it out in my head and it is not difficult at all to do. In it's current form, you could use it at the tables, but it is not worth it. You don't really need that much accuracy. I've only produced this to satisfy my curiosity. I will not be using it while playing poker.

If you want it to produce exact results, the sequence of Ki begins with 32/10.81 = 2.9602220166512487 and is reduced with each iteration by dividing it by 4. Also start with an exact value for 16 outs , which is 1232/21.62 = 56.98427382053654 instead of 57.0.

 06-08-2012, 04:43 PM #7 veteran     Join Date: Aug 2009 Location: Stanford, CA USA Posts: 3,330 Re: Recursive 2 street equity formula What is the point of all this? You have F(x)=a*x^2+b*x+c and you are basically doing what evaluating F(x+2) in terms of F(x+1) and F(x)? Obviously F(x+2)=a*(x+2)^2+b*(x+2)+c =a((x+1)^2+2(x+1)+1)+b(x+1)+b+c= =a*(x+1)^2+b*(x+1)+c+2*a*(x+1)+a+b=F(x+1)+2*a*(x+1 )+a+b F(x+2)=F(x+1)+2*a*(x+1)+a+b and F(x+1)=F(x)+2*a*x+a+b (we could have simply written F(x+1) in terms of F(x) and avoided the 2 steps process above anyway, its easier this way ) so subtraction by parts; F(x+2)=2*F(x+1)-F(x)+2*a. That holds for any quadratic F(x) but why is that result useful in anything? Sorry not intending to be rude or anything just dont see what the purpose is here of something that is probably important in numerical differential equation solutions etc (you know derivatives to differences etc). Here you have a simple problem. You know the solution directly why bother with recursive expressions? Last edited by masque de Z; 06-08-2012 at 04:56 PM.
06-08-2012, 06:44 PM   #8

Join Date: Jan 2006
Posts: 702
Re: Recursive 2 street equity formula

Quote:
 Originally Posted by masque de Z What is the point of all this? You have F(x)=a*x^2+b*x+c and you are basically doing what evaluating F(x+2) in terms of F(x+1) and F(x)? Obviously F(x+2)=a*(x+2)^2+b*(x+2)+c =a((x+1)^2+2(x+1)+1)+b(x+1)+b+c= =a*(x+1)^2+b*(x+1)+c+2*a*(x+1)+a+b=F(x+1)+2*a*(x+1 )+a+b F(x+2)=F(x+1)+2*a*(x+1)+a+b and F(x+1)=F(x)+2*a*x+a+b (we could have simply written F(x+1) in terms of F(x) and avoided the 2 steps process above anyway, its easier this way ) so subtraction by parts; F(x+2)=2*F(x+1)-F(x)+2*a. That holds for any quadratic F(x) but why is that result useful in anything? Sorry not intending to be rude or anything just dont see what the purpose is here of something that is probably important in numerical differential equation solutions etc (you know derivatives to differences etc). Here you have a simple problem. You know the solution directly why bother with recursive expressions?
I believe I answered this more than once already. I'm basically doing it for kicks. I'm trying to solve the hypothetical goal of being able to accurately calculate these values in the easiest way possible without benefit of pencil & paper, calculator or computer program. And as I've said many times before, I would not use this at the table. In any case, this is a theory forum. Things do not necessarily have to be useful for anything.

You are right about this being workable for any quadratic. Similar methods are possible for any polynomial and not just quadratics. It can also be "inverted" to obtain roots to polynomials as well.

I was done with posting on this topic due to lack of interest, but then erdnase17 expressed some interest, so I supplied a bit more information. I'm not trying to sell the idea on anyone. Like I said many times before, I would not use it in a game.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are Off Refbacks are Off Forum Rules

All times are GMT -4. The time now is 10:59 AM.

 Contact Us - Two Plus Two Publishing LLC - Privacy Statement - Top