Poker-AI.org Poker AI and Botting Discussion Forum 2018-01-01T20:31:17+00:00 http://poker-ai.org/phpbb/feed.php?f=26&t=3100 2018-01-01T20:31:17+00:00 2018-01-01T20:31:17+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7506#p7506 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> spears wrote:

I'm not sure this explanation is going to survive much scrutiny but here goes:
- Hero's reach probability is taken as 1.0 because it is a hypothetical case - if I take this this or that action what is the regret? Suppose the reach probability was 0, there would be no regret.
- Villain's reach probability is taken as the current one. If that were to be zero, there would be no regret.


That actually makes a lot of sense, thanks.

Statistics: Posted by listerofsmeg — Mon Jan 01, 2018 8:31 pm


]]>
2018-01-01T12:10:51+00:00 2018-01-01T12:10:51+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7504#p7504 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> listerofsmeg wrote:

Also, to those who know understand CFR, what's the intuitive explanation why regrets are weighted not by probability of achieving a node, but by "external probability" (our contribution to the probability is excluded)?


I'm not sure this explanation is going to survive much scrutiny but here goes:
- Hero's reach probability is taken as 1.0 because it is a hypothetical case - if I take this this or that action what is the regret? Suppose the reach probability was 0, there would be no regret.
- Villain's reach probability is taken as the current one. If that were to be zero, there would be no regret.

Statistics: Posted by spears — Mon Jan 01, 2018 12:10 pm


]]>
2017-12-31T19:35:30+00:00 2017-12-31T19:35:30+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7503#p7503 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> mediacalc wrote:

Nice find.

Years ago I tried a variant of fictitious play where on each iteration I
- calculated the best response of the current player
- estimated the value of the game as the average of the best responses of both players
- found the difference between the current best response value and the estimated value of the game (d)
- added the current best response * d / constant to the current strategy. At equilibrium d is zero, so no updating is required

It worked really well on the toy games I tested but failed when I tried something larger.

Statistics: Posted by spears — Sun Dec 31, 2017 7:35 pm


]]>
2017-12-31T15:22:40+00:00 2017-12-31T15:22:40+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7502#p7502 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> Some insight into what Pio uses now

Statistics: Posted by mediacalc — Sun Dec 31, 2017 3:22 pm


]]>
2017-12-31T12:32:18+00:00 2017-12-31T12:32:18+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7501#p7501 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]>
By the way, I haven't really looked into CFR+ yet, any idea how does it compare to CFR with external sampling (the fastest sampling varian for poker I heard)?

Also, to those who know understand CFR, what's the intuitive explanation why regrets are weighted not by probability of achieving a node, but by "external probability" (our contribution to the probability is excluded)?

Statistics: Posted by listerofsmeg — Sun Dec 31, 2017 12:32 pm


]]>
2017-12-31T08:44:44+00:00 2017-12-31T08:44:44+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7500#p7500 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]>
I guess I have to do more research on Pio though. I actually assumed CFR was still the best algorithm, I mean it's used by all the top researchers afterall.

Statistics: Posted by HontoNiBaka — Sun Dec 31, 2017 8:44 am


]]>
2017-12-30T20:45:18+00:00 2017-12-30T20:45:18+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7499#p7499 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]>
I'm somewhat confused by your post. Equity is not needed in CFR, so I assume you're using it for all-in situations on the turn as an optimization? My intuition is that it wouldn't speed things up too much, because the non-all-in cases would dominate computation time.

Anyway, look into OMPEval. This should be doable in about one millisecond.

Statistics: Posted by listerofsmeg — Sat Dec 30, 2017 8:45 pm


]]>
2017-12-25T19:08:48+00:00 2017-12-25T19:08:48+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7494#p7494 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> The reason why I only asked about Turn all-in nodes was, because I already had code for the normal showdowns from Amax' code.

I create random ranges and a random potsize, it terminates quicker with a bigger potsize as the players have less stack left, but on average I need something like 500 seconds for 1000 iterations, which seems to be similar to the runtimes Alberta had.

Statistics: Posted by HontoNiBaka — Mon Dec 25, 2017 7:08 pm


]]>
2017-12-23T10:41:25+00:00 2017-12-23T10:41:25+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7492#p7492 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> if so, that is a very small problem and I'm fairly sure it could be solved by LP. LP would become infeasible when there are more actions.
If significant numbers of the hpd = zero you might be able to cut down the problem even more.

Edit: Also let me know how long your CFR solution is taking. I have a relatively simple idea that might improve CFR if you are just doing push fold but I need you to confirm my understanding of the problem first.

Statistics: Posted by spears — Sat Dec 23, 2017 10:41 am


]]>
2017-12-22T23:34:22+00:00 2017-12-22T23:34:22+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7491#p7491 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]>
I see a few points that I could improve, for example I could collapse most rivers if no flush draw is possible. I tried using some isomorphisms, but didn't get it to work so far. But even then, it will be much slower than Pio, I guess they really do something different. However I think I will just let it run the way it's now. I will build some Neural Networks and see if I can replicate what DeepStack did.

Statistics: Posted by HontoNiBaka — Fri Dec 22, 2017 11:34 pm


]]>
2017-12-20T10:58:24+00:00 2017-12-20T10:58:24+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7481#p7481 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]>
Edit1: Just noticed it's for all ins, so maybe it's faster to calculate the turn equity table.
Edit2: This isn't a huge problem. Could you solve it using linear programming?

Statistics: Posted by spears — Wed Dec 20, 2017 10:58 am


]]>
2017-12-19T14:19:54+00:00 2017-12-19T14:19:54+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7479#p7479 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> nefton wrote:

Make shure you have no one operator new or std::vector.pushback in your loops.
Or any others working with memory. Only constant size arrays and operator [].

I already only use constant size vectors. I never allocate memory after building the initial tree, each node has fixed vectors for all regrets, cumulative strategies, and even reach probabilities and returned evs. All I ever do is passing pointers.

spears wrote:

I think PioSolver may be doing something cleverer than CFR or CFR+ I don't properly understand it and it's been a while since I looked at it but I think the CMU paper on Libratus shows how CFR+ could be accelerated.

Ok I will check it out, thx.

Statistics: Posted by HontoNiBaka — Tue Dec 19, 2017 2:19 pm


]]>
2017-12-19T10:29:29+00:00 2017-12-19T10:29:29+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7478#p7478 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> Statistics: Posted by spears — Tue Dec 19, 2017 10:29 am


]]>
2017-12-19T11:30:05+00:00 2017-12-19T07:38:47+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7477#p7477 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> Or any others working with memory. Only constant size arrays and operator [].

Statistics: Posted by nefton — Tue Dec 19, 2017 7:38 am


]]>
2017-12-19T07:23:59+00:00 2017-12-19T07:23:59+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7476#p7476 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> Anyone here implemented vanilla or cfr+? How long does an iteration from the turn usually take?

Statistics: Posted by HontoNiBaka — Tue Dec 19, 2017 7:23 am


]]>
2017-12-17T18:46:54+00:00 2017-12-17T18:46:54+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7474#p7474 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> Statistics: Posted by HontoNiBaka — Sun Dec 17, 2017 6:46 pm


]]>
2017-12-16T16:55:46+00:00 2017-12-16T16:55:46+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7473#p7473 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> spears wrote:

Is an equity table a table of the chance of each hand winning versus every other hand? I think I can do for the turn that in 2 seconds. Is that too long?

Yes. Strange, it takes me much longer than that, more like 2 minutes, I am using the Alberta handevaluator.
Maybe I have some bugs or inefficiencies in my code, if it can be done in 2 seconds that would be more than ok, I will try to improve the table generation then.

Statistics: Posted by HontoNiBaka — Sat Dec 16, 2017 4:55 pm


]]>
2017-12-16T14:57:56+00:00 2017-12-16T14:57:56+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7472#p7472 <![CDATA[Re: How to handle Flop and Turn All-Ins in CFR+]]> Statistics: Posted by spears — Sat Dec 16, 2017 2:57 pm


]]>
2017-12-16T00:48:47+00:00 2017-12-16T00:48:47+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=3100&p=7471#p7471 <![CDATA[How to handle Flop and Turn All-Ins in CFR+]]>
So basically the value of a Turn all in should be similar to a River Showdown Node, but instead of just summing wins/losses I think you have to multiply the probability of each opponent hand with your equity against it.

Code:
   std::vector<double> ev(1326, 0);
   
   const Distribution &pholes = distributions[trainPlayer];
   const Distribution &oholes = distributions[!trainPlayer];

   for (int i = 0; i < p.size(); i++){
      double sum = 0;

      for (int j = 0; j < op.size(); j++){

         if (!pholes[i].overlaps(oholes[j])){
            sum += op[j] * (2 * turnEquities[i][j] - 1);
         }
      }

      ev[i] = sum * payoff;
   }

   return ev;


So far my games are always starting from the Turn. I created an equity table, but it takes a long time to create for each turn and it's rather big.
How do programs like Pio Solver do it? I don't think they are creatign tables, but I think they are using Vanilla or CFR+
Any ideas? You see any bugs in my code? It's loosely based on Amax' code.
One idea would of course be to just enumerate all Rivers, but I guess that would be slow?

Statistics: Posted by HontoNiBaka — Sat Dec 16, 2017 12:48 am


]]>