Sunday, May 31, 2009

After getting some promising results I decided to start recording some. Obviously I can’t wait until I see some results and then record them – That skews the statistics (or something like that).



This does not necessarily correlate with the optimal strategy provided by Cassidy. But I was excited to see P1 value betting roughly twice as much as they were bluffing, which is part of the optimal strategy given for bet size 1 bluff size 1.




All of these results will be based on bet size 1 with ante size 1 and 1000 hands per game.

This first test (after I got curious) is not as specific. If I had displayed the “field of players” that the AIs were up against we may be able to see why their strategies are what they are. An even more refined (maybe binomial cubed?) mutate method may be used to force the field to stay closer to the “breeders” listed. Lets look at some more results. I’ll show 5 more with the same parameters.




In generation 6 above we have the first appearance of a winning P2 strategy that value bets less than a winning P1 strategy. Next gen. the strategy was way different.





Okay, this time I accidentally chose 20 generations to run instead of 10. (Was thinking 20 since there are 20 AI of each P1 and P2 for each generation. Oh well.

Player 2 bluffs between 4% and 30% (usually around 10%) while Player 1 seems to oscillate between almost 0% and about 50%.



Here somehow P2 won in gen. 1 by simply betting almost all the time. That wasn’t the best though. This one gives close to the suggested optimal strategy for P2 of value betting 1/3 of hands while bluffing 1/6 of hands. Would look like (.33, c, .83).

Interestingly P1 seems to do well almost never bluffing at times.

Okay, we’ll run one more…



Here P2 did well bluffing between 5% and 15% while player 1 again jumped from over 50% to nearly never bluffing. Again, Player 1 almost always (except in the last generation) value bets less often than P2.

This tendency for P1 to value bet and to bluff less often than P2 is stated to be part of an optimal strategy for this situation by Jack Cassidy in The Last Round of Betting in Poker where he gives an optimal strategy for this game as

(1/6, ½, 1/12) for P1 ,

and (1/3, ½, 1/6) for P2.

I think it may be valuable to check by how much these winners are winning and what their opponents strategies are. (These are settings in the program that can be easily set, but I should output to a file instead of the command prompt to adequately store the data.)

Monday, May 25, 2009

Everyone hates Math!

I mean real math. People don't mind doing calculations, or using formulas. But when I try to get someone to verify some logic, I stun people. Just asking, "does this make sense?" seems to offend people.

My math senior project is to review, explain, and extend an article from a math journal. I'm doing The Last Round of Betting in Poker by Jack Cassidy from The American Mathematical Monthly. It seems like even Cassidy doesn't want to do any of what I've come to know as real math. He doesn't give explicit definitions. He doesn't clearly state his assumptions. He doesn't support many claims.

One problem I have with it is that it uses the [0,1] game, which is beautiful and elegant when representing a uniform distribution of hands (0 being the best hand, 1 being the worst). That way, the probability of a random hand y in [0,1] being greater than or equal to a fixed hand x can be expressed as

P(x≤y) = y.
But, in Cassidy's article, he states he is using the [0,1] game, but the only thing he seems to use it for is the notation of ≤ to mean better than or equal to. And then, instead of referring to the [0,1] game he claims to be using, in examples he translates directly from probability (which he writes as F(y)) to a hand in the game for which the probability for having a hand equal to or better than that is equal to F(y).
So, I don't really have time to do it right now, but I would really love to examine if his results really are optimal solutions (neither opponent can adjust to improve their overall expectation), see if this pair of optimal solutions is unique - in other words, see if more than one pair of optimal solutions exists (maybe they will all satisfy the equations given in his article).
Anyways, the strategy seems brittle. He gives results that when translated to the common [0,1] game (not exactly what he uses) with bet size equal to pot size, and uniform distributions, we get the strategies (1/6, 1/2, 1/12) for P1 and (1/3, 1/2, 1/6) for P2. This means P1 should bet the best 1/6 of hands, and bluff the best 1/12 of hands, and call with hands better than or equal to 1/2 (1/3 of starting hands if opponent bets). Similarly for P2. But I wonder, can either player improve their expectation? If so, they are not an optimal pair. I know that if P1 or P2 decided not to bluff at all, it then becomes wrong for P2 to call so much. As it is, it does not matter where the call values are (1/2 seems almost arbitrary). But if 1/2 is the right value, then value betting more or less hands should reduce the expectation, and bluffing more or less hands should do the same.
I have to finish my senior project now though, so I won't worry about these details now.
Let me know if you know anything about this.