Back in 2004, I spent most of my time building a poker bot to play low stakes limit texas holdem. (A poker bot is a program that automatically plays poker against humans on one of the major internet poker sites). The project consumed me. It was both challenging and exciting. I successfully ran the bot for a few years before shutting it down when I took my first job on Wall Street.
I worked alone on the poker bot. I designed and implemented the poker client interface, the AI, and monitoring framework. Since then, I’ve enjoyed reading a few blog posts detailing the efforts and celebrations of other poker bot creators. Just today I read this one. I’d like to join the party and share some details about how I built my bot.

When I started the project, I wasn’t sure how to interface with the poker client. The poker sites don’t provide an API, so I either had to reverse engineer the network protocol or build a screen scraper. I knew a lot about hacking network protocols, and I had never built a screen scraper. (I also noticed that one of the sites used an open source SSL library that I could swap out).
Despite these advantages, I wanted to build a screen scraper because:
- It’s harder for the poker client to detect a screen scraper. I didn’t want exhibit an identifying communication fingerprint.
- I didn’t want to reverse engineer multiple network protocols. It seemed easier to get a screen scraper working on different poker clients.
I wrote the scraper using C#. One weakness of my scraper was that the windows all had to be a certain size, and they could not overlap. I worked around this by building a simple tiling window manager with an AutoHotKey script.
I routed information from the scraper through a piece of software that I called the poker gateway. This gateway directed information to a hand history database, poker AI, lobby AI, and control center. All of these components ran on a separate linux box, and I used Ruby to develop them all.
This architecture was robust and flexible. As a result, I could focus most of my energy and thought on building the AI.
I’d enjoy hearing from other poker bot creators. It would be fun to swap war stories.