Poker Bot Artificial Intelligence Resources

University of Alberta Computer Poker Research Group

The University of Alberta Computer Poker Research Group has been researching Artificial Intelligence applied to Poker since the mid-90's. They have published many papers over those years with detailed algorithms and results. Anyone considering working on Poker AI should get familiar with the work done here. I joined the group in 1999 and completed my MSc. thesis in 2002.

The task of playing poker (Texas Hold'em) is a very difficult one. Unlike traditional games worked on in the field of Artificial Intelligence, in Poker we must deal with incomplete information. Games like Chess and Checkers are examples perfect information games, where the entire state of the game is known to all players. In Texas Hold'em, there can be anywhere from 2 to 10 players, and we have no idea what cards they may be holding. To complicate things, players may deliberately deceive you (by bluffing with a weak hand or slow playing a strong hand). I have been studying methods to do opponent modeling in poker. In this case, we are interested in being able to accurately guess what cards a player may be holding and how he may play them. This is no trivial task. Some of my more recent work in this area is shown below.

Poker Academy Pro & Meerkat API

One of the best resources for the poker coder is the poker simulation software from Poker Academy. This simulation package contains the Poker AI (Pokibot, Sparbot, Vexbot) developed at the University of Alberta. It was launched in December 2003 as a commercial Poker Training package. I was one of the principle developers of Poker Academy Pro.

Poker Academy provides a Java based API (named the Meerkat API) that allows poker bot coders to plug in their own custom bots. This gives an excellent environment for bot development as you can easily play against your bot in a quality GUI or have your bot play thousands of hands against the Pokibot AI. The program also keeps track of all the hands played and can display comprehensive graphs and analysis of the player statistics.

The Poker Academy Forums host a topic area for the Meerkat AI which has a community of poker bot authors that enjoy sharing ideas, discussing game theory, and posting results from their poker AI experiments.

Hand Evaluators

The most critical subroutine needed for poker AI is a Hand Evaluator. A Hand Evaluator takes a poker hand and maps it to a unique integer rank such that any hand of equal rank is a tie, and any hand of lesser rank loses. A hand evaluator may also classify the hand into a category (a Full House, Tens over Aces). For poker AI, it is absolutely critical to have the fastest hand evaluators possible. Most poker AI works through either enumerating all possible hands or by simulating thousands of hands. These calculations need to do thousands of hand evaluations in just a few seconds, for a poker AI to make a decision in a reasonable amount of time.
Coding th Wheel
Probably the best article yet, summarizing hand evaluators and algorithms is this blog post.
PokerSource
The fastest evaluators are from the GPL pokersource project on SourceForge.net. They have hand evaluators for C, Java, and Python.
Cactus Kev's Poker Hand Evaluator
Cactus Kev has a 5-card poker hand evaluator that is blazingly fast. It uses a very neat technique to rank the hands. The page is a worthy read for any poker geek.
University of Alberta Hand Evaluator
The UofA has released some of the Java code from the poker project, most notably the Hand Evaluator (Java). The Javadocs are available here.
C# Hand Evaluators
Many C# programmers have been looking for Hand Evaluators. C# Evaluator.

Publications