Smash Vegas

Avatar

Anatomy of a pokerbot - strategy

In this post we are going to design the logic we want our bot to follow.

Openholdem works by looking in turn at several functions which you design.  It stops to act on the first one which evaluates true.  First it checks the all in function, then the stated wager function, then the raise function, then the call function.  Since we are programming a limit bot we can ignore the first two (and make them always return false).  That leaves us with a raise function and a call function to design.

Our bot is going to play simple ABC poker.  We want it to evaluate the expected value of raising and calling, and then choose the greatest out of raising, calling and folding (the EV of folding is always 0).

A quick and dirty estimate of our EV of calling is:

(current pot + our call + other callers)*(our probability of winning) - (our call)

Similarly our estimate for the EV of raising is:

(current pot + our call + our bet + other callers)*(our probability of winning) - (our call + our bet)

Basically both cases are “what we could win multiplied by our chance of winning, minus what it costs us to call”.  They are analogous to looking at the pot odds and comparing them with our chance to win, but instead give us a numerical output of how much we expect to win or lose with a play in the long term.  These EV formulae are very basic, but later on we’ll look at ways to make them a bit better.

Next time we’ll look at how to code this as an Openholdem formula.

No Comments, Comment or Ping

Reply to “Anatomy of a pokerbot - strategy”