Poker-AI.org Poker AI and Botting Discussion Forum 2013-06-04T18:02:00+00:00 http://poker-ai.org/phpbb/feed.php?f=24&t=2489 2013-06-04T18:02:00+00:00 2013-06-04T18:02:00+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4303#p4303 <![CDATA[Re: Range Equity Distribution Calculation]]> drunkandrich wrote:

As I understand it EHS2 is meant to be used only for sorting hands. To that end your EHS->HS2 tables look entirely appropriate: AA is still ranked #1 and hands like 65s have moved ahead of J2o type hands as is intended. 82o has moved down to 6th from last in EHS2 from somewhat higher in EHS.


Right. I somehow lost the focus

Statistics: Posted by Nose — Tue Jun 04, 2013 6:02 pm


]]>
2013-06-03T15:47:03+00:00 2013-06-03T15:47:03+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4292#p4292 <![CDATA[Re: Range Equity Distribution Calculation]]> Statistics: Posted by drunkandrich — Mon Jun 03, 2013 3:47 pm


]]>
2013-06-03T14:12:20+00:00 2013-06-03T14:12:20+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4291#p4291 <![CDATA[Re: Range Equity Distribution Calculation]]> http://poker.cs.ualberta.ca/publications/johanson.msc.pdf wrote:

Expected Hand Strength Squared
Earlier, we explained how potential was not well measured by the E[HS] metric. In our new bucketing
approach, we roll out the cards for each hand and measure the expected value of the square of
the hand strength. This approach (abbreviated as E[HS2]) also assigns values in the range [0, 1] to
hands, but assigns a higher value to hands that have potential to improve in strength.
[...]


This - if I understand it correctly - means: The higher the potential to improve in strength, the higher the assigned value. But then - why is a higher value assigned to 82o? Since all values are < 1 : shouldn't EHS^(1/2) be a better metric to express potential to improve in strength? This starts confusing me :?

Statistics: Posted by Nose — Mon Jun 03, 2013 2:12 pm


]]>
2013-06-03T11:31:14+00:00 2013-06-03T11:31:14+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4290#p4290 <![CDATA[Re: Range Equity Distribution Calculation]]> http://poker.cs.ualberta.ca/publication ... on.msc.pdf

Statistics: Posted by spears — Mon Jun 03, 2013 11:31 am


]]>
2013-06-03T14:31:17+00:00 2013-06-03T10:53:19+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4289#p4289 <![CDATA[Re: Range Equity Distribution Calculation]]> spears wrote:

- It takes a few hours.
- You need to remember the number of instances per isomorph to sample accurately
- I don't think anyone has uploaded the tables


Thanks again for your useful hints. When looking at the file sizes I understand why nobody uploaded them before :)

I attached my results for preflop EHS and EHS2-values.

[GREEN] refers to the top 25%
[GRAY] refers to the top 50%
[WHITE] refers to the top 75%
[RED] refers to the top 100%

But honestly I am a bit disappointed. When looking at the "winners" and "losers" table I created

Formula: CHANGE = EHS - SQRT(EHS2)

you can see that all weak cards benefit from that rule and all strong cards get punished. As you can see even 82o gets a huge bonus. This surprises me. I thought the idea behind using EHS<n> is to give hands with strong potential (such as connectors, suiteds) a bonus regarding to the ring size n.

On the other hand holecards like J3o and 82o should be punished since they are weak hands overall and have no potential. But as you can see the most punished hand is AA while - just to mention it again - 82o gets a bonus in strength.

Is that really what we want? Does anybody know why we want that?

[EDIT] Attached the tables since a few people are interested in the numbers

Statistics: Posted by Nose — Mon Jun 03, 2013 10:53 am


]]>
2013-05-31T14:28:02+00:00 2013-05-31T14:28:02+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4278#p4278 <![CDATA[Re: Range Equity Distribution Calculation]]> - You need to remember the number of instances per isomorph to sample accurately
- I don't think anyone has uploaded the tables

Statistics: Posted by spears — Fri May 31, 2013 2:28 pm


]]>
2013-05-31T13:11:32+00:00 2013-05-31T13:11:32+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4277#p4277 <![CDATA[Re: Range Equity Distribution Calculation]]> spears wrote:

- Don't translate from boards to board isomorphs. Just sample from the board isomorphs.


Nice hint. Thanks

spears wrote:

- Forget about files. Keep it in memory.


Also thanks a lot for that. That saved me from wasting a lot of time. For EHS² I did some math for further readers:

Code:
Assuming 16,432 turns and 2,652 possible holecards (neglecting redundancies) we need to obtain 43,577,664 (rather cheap) EHS² values, requiring 348,621,312bytes in memory (assuming 8 byte doubles)
Assuming 1,755 flops and 2,652 possible holecards (neglecting redundancies) we need to obtain 4,654,260 (rather expensive) EHS² values, requiring 37,234,080 bytes in memory (assuming 8 byte doubles)

Leading to a total of 385,855,392 bytes  ~368 Mb in memory



I am now asking myself how long it would take to precompute all EHS² values. Are there already tables available in the archive? The search method does not work really well for me

Statistics: Posted by Nose — Fri May 31, 2013 1:11 pm


]]>
2013-05-31T12:06:43+00:00 2013-05-31T12:06:43+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4276#p4276 <![CDATA[Re: Range Equity Distribution Calculation]]> - Forget about files. Keep it in memory.

Statistics: Posted by spears — Fri May 31, 2013 12:06 pm


]]>
2013-05-31T10:48:51+00:00 2013-05-31T10:48:51+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4275#p4275 <![CDATA[Re: Range Equity Distribution Calculation]]>
One way to do it would be to store all iso-boards with its corresponding index in a hashtable. But the same problem arises in another case, where it cannot be solved that easy:

Assuming you are precomputing all EHS and EHS²-values and store them in a file like approached by dipitlow:
http://poker-ai.org/archive/www.pokerai ... 455#p13455

Now, given a certain board a formula is required to translate its board-bit-structure into a number representing the offset in the file where the numbers are stored.

This time a hashtable-approach seems quite inefficient to me since there are so many possible boards for which values need to be stored in memory.

Statistics: Posted by Nose — Fri May 31, 2013 10:48 am


]]>
2013-05-30T16:53:25+00:00 2013-05-30T16:53:25+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4273#p4273 <![CDATA[Re: Range Equity Distribution Calculation]]> Statistics: Posted by winnie — Thu May 30, 2013 4:53 pm


]]>
2013-05-30T16:35:28+00:00 2013-05-30T16:35:28+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4272#p4272 <![CDATA[Re: Range Equity Distribution Calculation]]>
A nut river board is any board that guarantees a split pot such as

- any royal flush
- any xxxxA or AAAAK board
- any ace high straight such there is no flush possible

Statistics: Posted by Nose — Thu May 30, 2013 4:35 pm


]]>
2013-05-30T16:30:06+00:00 2013-05-30T16:30:06+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4271#p4271 <![CDATA[Re: Range Equity Distribution Calculation]]> spears wrote:

Yes. 134459 river, 42769 non nut river boards

thx

Statistics: Posted by Nose — Thu May 30, 2013 4:30 pm


]]>
2013-05-30T16:20:00+00:00 2013-05-30T16:20:00+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4270#p4270 <![CDATA[Re: Range Equity Distribution Calculation]]> Statistics: Posted by spears — Thu May 30, 2013 4:20 pm


]]>
2013-05-30T15:35:59+00:00 2013-05-30T15:35:59+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4269#p4269 <![CDATA[Re: Range Equity Distribution Calculation]]> spears wrote:

[...] IIRC correctly there are only about 1800 flops and 16000 turns taking account of isomorphisms


Just for cross-checking. I am currently working on that: 1755 isomorphic flops and 16432 isomorphic (flop-turn) combinations?

Statistics: Posted by Nose — Thu May 30, 2013 3:35 pm


]]>
2013-05-20T05:48:15+00:00 2013-05-20T05:48:15+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4207#p4207 <![CDATA[Re: Range Equity Distribution Calculation]]> http://www.site.uottawa.ca/~lucia/courses/5165-09/ you can find information on isomorphism-free exhaustive generation.

Statistics: Posted by nemesis17 — Mon May 20, 2013 5:48 am


]]>
2013-05-15T21:40:06+00:00 2013-05-15T21:40:06+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4163#p4163 <![CDATA[Re: Range Equity Distribution Calculation]]>
thanks for answering

@spears:
(1) yes, by MM I mean million. it's a finance abbreviation I guess
(2) yes, by a hand lookup I mean := obtaining a hand-strength-value given some
(a) holecards
(b) flop
(c) turn and
(d) river
==> to evaluate whether hero's hand won or not there are two lookups (in HU) or n lookups (in a n-ring game) required
(sorry if I mess up the terminology)

@spears, somehomelessguy:
I am interested in obtaining the equities of all holecards in a specific range at once. by that I mean: given any range R I am looking for an algorithm that gives me the equities of all holecards H \in R at once and especially NOT for the overall equity of R against a random range

@spears: these calculations come into play postflop which leads us (naively) to a [#firstHolecards=53][#secondHoleCards=53][#turnCards=53][#riverCards=53]-array of possible lookup values. assuming 4 bytes per entry (including redundant and invalid combinations) this takes ~31,561,924bytes in memory
... oh by the way one question: Are you aware of papers building somewhat like an homomorphism of holecards given a specific board. (for instance if you have a monotone-flop of spades all suited holecards of clubs, hearts and diamonds would be in the same equivalence-class ... regarding equity)

@somehomelessguy: if I am not mistaken: assuming you are at the flop you have to do range_size*range_size*[#turncards]*[#rivercards] which (worst case) is a little less then (49*48)/2 * (47*46)/2 * (45*44)/2 = 1,258,543,440 * 2 lookups to obtain the equity of each holecard in your range

my problem now is that exhaustive enumeration takes somewhat like 15-30 seconds so I am looking for methods to approximations the equities.

@loudion: there are several practical reasons why I need the equities rather quickly. Anyway I took your advice to grab a (few) beer. cheers ;)

[EDIT] a few numbers

Statistics: Posted by EternalGuest — Wed May 15, 2013 9:40 pm


]]>
2013-05-14T10:33:33+00:00 2013-05-14T10:33:33+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4157#p4157 <![CDATA[Re: Range Equity Distribution Calculation]]>
are you only interested in a range vs random hand, or also range vs range?

anyway, you should only need range_size*range_size LUT lookups, so i don't see why you would need MC simulation unless you need the value superfast.

Statistics: Posted by somehomelessguy — Tue May 14, 2013 10:33 am


]]>
2013-05-14T07:26:25+00:00 2013-05-14T07:26:25+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4153#p4153 <![CDATA[Re: Range Equity Distribution Calculation]]>
You say you can do 120MM hand lookups / sec using a LUT. Does MM mean a million? And by hand lookup do you mean for example Ac3d v random hand for a particular board? It shouldn't be hard to achieve 120 million hand lookups using a LUT of all hands against a random hand for all boards. In any case the expensive part is computing the index of the board, and after that finding a particular hand equity for that board is quite cheap.

And then you use MC simulation to evaluate the range expression (22+, A2s+, K2s+, Q2s+, A2o+, K2o+, Q2o+) ?

Could you construct a LUT containing the equity of each of the range elements (22+, A2s+, K2s+...) v a random hand for all boards, and then just average them at runtime? IIRC correctly there are only about 1800 flops and 16000 turns taking account of isomorphisms

Statistics: Posted by spears — Tue May 14, 2013 7:26 am


]]>
2013-05-14T06:54:07+00:00 2013-05-14T06:54:07+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4152#p4152 <![CDATA[Re: Range Equity Distribution Calculation]]> 1 You posted in Online Botting
2 I answered
3 I moved the thread to Miscellaneous
4 You started a new thread in AI Research
5 I deleted the thread in Miscellaneous

Statistics: Posted by spears — Tue May 14, 2013 6:54 am


]]>
2013-05-13T20:54:52+00:00 2013-05-13T20:54:52+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4146#p4146 <![CDATA[Re: Range Equity Distribution Calculation]]> EternalGuest wrote:

Implementing Monte Carlo in ASM with a few preparations (Pre-Lookup all possibly required values from the LUT in an array and ensuring a collision-free choice of cards for each iteration) does the trick for now.

Still looking for smart improvements. This part is crucial for me

Sorry for bothering and thanks for your help

I agree that Monte Carlo and LUTs are the way to go when facing huge calculations and little time to perform them. But I don't think it's really necessary to write anything in ASM. The compilers of today will do a lot of optimizations and you probably won't get any better performance out of it unless you write your ASM code flawless. If you got extra time over then it's much better spent refining your AI or grabbing a beer.

Statistics: Posted by loudion — Mon May 13, 2013 8:54 pm


]]>
2013-05-12T23:02:28+00:00 2013-05-12T23:02:28+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4143#p4143 <![CDATA[Re: Range Equity Distribution Calculation]]>
Still looking for smart improvements. This part is crucial for me

Sorry for bothering and thanks for your help

Statistics: Posted by EternalGuest — Sun May 12, 2013 11:02 pm


]]>
2013-05-12T18:07:36+00:00 2013-05-12T18:07:36+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2489&p=4142#p4142 <![CDATA[Range Equity Distribution Calculation]]>
____________________________________________________________________________________________________________________________________
My post then:

Yes, I have an implementation of that already. I can do like 120MM hand-lookups/s which leads to (ideally 60MM hand-evaluations/s).

My problem now is, that, given a larger range like (22+, A2s+, K2s+, Q2s+, A2o+, K2o+, Q2o+) there are so many hands, that calculating the postflop equities takes ... some time. Approximating the partial equities with (i.e. a Monte Carlo simulation) works fine in most of the cases (even if I only have ~10k samples per specific hand after like 4s), but maybe anybody is aware of some "synergy effects" which allow you to obtain 4 samples by doing 3 simulations by smartly choosing specific flop and turn-cards or something like that.

Cheers

Statistics: Posted by EternalGuest — Sun May 12, 2013 6:07 pm


]]>