Poker-AI.org Poker AI and Botting Discussion Forum 2019-08-22T10:11:05+00:00 http://poker-ai.org/phpbb/feed.php?f=24&t=3234 2019-08-22T10:05:29+00:00 2019-08-22T10:05:29+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8131#p8131 <![CDATA[Re: Best way to calculate EV and Equity quickly]]> Main keyword i talking about is "accuracy"
how many itterations do you do? why? do you ask yourself that question?
may be doing 10% of that amount of itterations in some cases will be enought to answer to your question?

Statistics: Posted by nefton — Thu Aug 22, 2019 10:05 am


]]>
2019-08-22T10:11:05+00:00 2019-08-22T09:42:53+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8130#p8130 <![CDATA[Re: Best way to calculate EV and Equity quickly]]> or can you get few (100, 1000) predefined ranges?
then solution is simple.
for each range pregenerate some distribution (few thousends card pairs) (with probabilities already calculated there)
so get random card pait will be just GerPair(rand()),
then you can calculate any you thoughts wery wery quick.
(cards vs distribution, distribution vs distribution vs distribution)
And this "not LUTs" will take no mutch place.
for example you have 100 predefined distributions, in each 2000 predefined card pairs
so it will takes only 100*2k*2 = 0.4Mb of memory
1000 predefined distributions will take 4Mb of memory :)

with this technik you will have easy calculation time < 1ms.
but if you want faster - just ask me how ))

Statistics: Posted by nefton — Thu Aug 22, 2019 9:42 am


]]>
2019-08-21T19:06:41+00:00 2019-08-21T19:06:41+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8129#p8129 <![CDATA[Re: Best way to calculate EV and Equity quickly]]> HontoNiBaka wrote:

shalako wrote:
this about 120G of data or so

That's only for HU, right?


Yeah Only HU as its hand vs hand but it would not take much to modify the calc for multiway. The data is the same.

Anybody know how solvers or a method to calculate optimal bet sizing? all I have seen is Tiptons Traps formula and not much else.

Statistics: Posted by shalako — Wed Aug 21, 2019 7:06 pm


]]>
2019-08-15T14:50:27+00:00 2019-08-15T14:50:27+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8121#p8121 <![CDATA[Re: Best way to calculate EV and Equity quickly]]> Statistics: Posted by HontoNiBaka — Thu Aug 15, 2019 2:50 pm


]]>
2019-08-15T14:49:39+00:00 2019-08-15T14:49:39+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8120#p8120 <![CDATA[Re: Best way to calculate EV and Equity quickly]]> shalako wrote:

this about 120G of data or so

That's only for HU, right?

Statistics: Posted by HontoNiBaka — Thu Aug 15, 2019 2:49 pm


]]>
2019-08-07T20:07:31+00:00 2019-08-07T20:07:31+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8101#p8101 <![CDATA[Re: Best way to calculate EV and Equity quickly]]> Statistics: Posted by shalako — Wed Aug 07, 2019 8:07 pm


]]>
2019-08-06T09:50:52+00:00 2019-08-06T09:50:52+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8100#p8100 <![CDATA[Re: Best way to calculate EV and Equity quickly]]>
I think you should be able to do this without using up too much memory. If not you can free up memory used in the NE calculation I think. I reckon it is possible to store each NE action probability in a byte.

Statistics: Posted by spears — Tue Aug 06, 2019 9:50 am


]]>
2019-08-05T19:12:10+00:00 2019-08-05T19:12:10+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8098#p8098 <![CDATA[Re: Best way to calculate EV and Equity quickly]]>
The NE calculation takes way longer than calculating EV or EQ, that is true, but the usage and the user's expectations are different. Basically the user runs the training over night generally, but then when he views the results he wants a responsive GUI.
So for example if he views the root of the game, the EQ and EV should be computed in maybe a second or so, and when he chooses an action, in other words he changes to a different game state, the EQ and EV should again be computed in about a second.
A full best response from the preflop round would take much longer than that, especially in multiway pots. If you for example take something like Equilab it takes some time to compute Equities for a 5 player situation, so I thought there might be faster ways with LUTs or so.

My monte carlo sampling looks like this:

Code:
std::discrete_distribution<int> distribution;

int HolecardRandomDistribution::nextCombo(unsigned long long cardMask) {
   int index = distribution(generator);
   unsigned char cards[2];
   Range::getHoleCardCombinationFromIndex(cards, index);
   while ((((cardMask | (1ULL << cards[0])) == cardMask) || (((cardMask | (1ULL << cards[1]))) == cardMask))) {
      index = distribution(generator);
      Range::getHoleCardCombinationFromIndex(cards, index);
   }

   return index;
}


Basically I sample a combination from a vector with 1326 probabilities and after each combo that I sample I set the corresponding bit in the cardMask.
If the combination that I sampled overlaps with any combinations that were sampled before, I resample.
For preflop HU and preflop 3handed I use LUTs.

Statistics: Posted by HontoNiBaka — Mon Aug 05, 2019 7:12 pm


]]>
2019-08-05T09:50:03+00:00 2019-08-05T09:50:03+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8097#p8097 <![CDATA[Re: Best way to calculate EV and Equity quickly]]>
But I'm confused by this question. Calculating the NE which you are already doing is orders of magnitude more expensive than calculating ev and equity, so I just don't see why it matters. If you already have the NE strategy can't you calculate best response from it? There are a lot of similarities between calculating EV, Equity and NE, so If you have some ingenious scheme to make the NE calculation go faster, can't you use a similar scheme to make EV and equity go faster.

I think to really be able to help I need to know what you are already doing better than I currently do.

Statistics: Posted by spears — Mon Aug 05, 2019 9:50 am


]]>
2019-08-04T18:58:25+00:00 2019-08-04T18:58:25+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8095#p8095 <![CDATA[Re: Best way to calculate EV and Equity quickly]]> I used the C++ standard library discrete_distribution and I also use rejection, meaning that rather than adjusting the probability for each combo every time I sample a new board (card removal basically) I just sample a hand from the original distribution and reject it/sample a new hand if it overlaps with the board.

Still the sampling is pretty much all of the runtime of my algorithm, even though the C++ standard say it's amortized constant time. Any ideas how to speed it up?

Statistics: Posted by HontoNiBaka — Sun Aug 04, 2019 6:58 pm


]]>
2019-08-01T05:37:55+00:00 2019-08-01T05:37:55+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8091#p8091 <![CDATA[Re: Best way to calculate EV and Equity quickly]]> Statistics: Posted by Knightenno — Thu Aug 01, 2019 5:37 am


]]>
2019-07-30T06:17:04+00:00 2019-07-30T06:17:04+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8089#p8089 <![CDATA[Re: Best way to calculate EV and Equity quickly]]> For example if hero has AA, the 2 villains have KK and A5. AA has 82% EQ vs KK and 90% EQ vs A5, can we from that calculate how much EQ AA has vs bot ranges combined?

I think it's not possible btw. but maybe I am wrong.

Statistics: Posted by HontoNiBaka — Tue Jul 30, 2019 6:17 am


]]>
2019-07-25T02:07:07+00:00 2019-07-25T02:07:07+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8081#p8081 <![CDATA[Re: Best way to calculate EV and Equity quickly]]> I checked how long it takes to compute the equity with Equilab for a flop and it's about 5-10 seconds which would be way too slow for my software.
Also unlike Pio my solver has multiway pots and preflop so it will take longer anyway. I will think about it more during the weekend but I think in the end a monte carlo eq and ev are the most likely ways I will tackle this.

Statistics: Posted by HontoNiBaka — Thu Jul 25, 2019 2:07 am


]]>
2019-07-17T09:05:13+00:00 2019-07-17T09:05:13+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8069#p8069 <![CDATA[Re: Best way to calculate EV and Equity quickly]]>
If it's like Pio then you surely you can get EVs from the last best response calculation you did in the solution. Equity is a similar, but simpler calculation because it only has to look at one path between chance nodes terminating in showdowns, not folds

Statistics: Posted by spears — Wed Jul 17, 2019 9:05 am


]]>
2019-07-17T01:33:15+00:00 2019-07-17T01:33:15+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3234&p=8062#p8062 <![CDATA[Best way to calculate EV and Equity quickly]]> So far it can display strategies and ranges, but now the guy also wants to display EQs and EVs. Everything has to happen pretty much in real time and before I start implementing it, I am thinking about the best way to do it.
The obvious way is to just enumerate everything, but it's a multiway solver that also supports preflop, so I think that might take too long?
Is there any way to calculate preflop EQs with LUTs? It's pretty simple in HU situations, you basically save all the hand vs. hand EQs and then weigh every hand according to the opponents range, but I think there is no way to do that in multiway pots, is that correct?
Right now I am thinking about using monte carlo methods for both calculations, but then again it might take some time untill it converges in multiway pots...

Any tips? Or maybe someone knows some good C/C++ code for this? (At least the EQ)

Statistics: Posted by HontoNiBaka — Wed Jul 17, 2019 1:33 am


]]>