Skip to content
Apr 6 2003 / Aaron


This weekend was a POKER weekend. First, saturday morning I joined friends at the Bacarrat Casino for a small 36 player Hold’em tournament. The first hour is limit, with tiny $5 rebuys, and unless you get lucky, you typically go through a few of these. This builds the prize pool — the bad players will rebuy 10 times, whereas the better players won’t usually need to rebuy more than a couple of times, if any. I had a total of 3, and busted pretty quickly when we hit no-limit in the second hour. I flopped a pair of aces, and went all in against the chip leader, who called me and then got runner-runner clubs to bust me. Oh well. Then Myke (who didn’t fare much better) and I went to the Palace Casino at the mall and joined a 3-6 hold’em game. Duane showed up later as well so it was nice to have two friends at the table to chat with. I started out with a really dry run of cards and slowly pissed half of my stack away. Then I had two fortunate things happen. I started to get decent cards, and after having spent two hours folding, I had a pretty good bead on most of the players at the table. I knew who to bluff at and who to call down. If you’re a pro-poker player reading this, try not to laugh 🙂 I know — these are basic things. But I’m still learning the feel for the game, and it felt good to be on top of things. Myke, unfortunately got horrible second-best hands all night and fared poorly. He definately had the skillz to take down the grubby troglodytes at our table, but the card gods strongly feel that only one of us can ever win at the same table. Last time we played together, it was the exact opposite. I finished the 4 hour stretch and cashed out with a cool $183 profit. That’s over seven big-bets per hour. Not too shabby.

Today, I dived back into poki’s source code. Poki is almost entirely written in java. There is one small but crucial component of poki that is written in highly optimized C code — the hand comparitor. Poki needs to do tens of thousands of hand comparisions in order to decide on an action. And poki needs to make its decisions within one or two seconds. Nothing can come close to touching the speed of the GNU hand evaluation library which has been tuned over many years to exploit everything possible. Our native java evaluator is orders of magnitude slower than the GNU C code. Thus there is a very ugly JNI interface to the GNU C library in order to get maximum performance out of poki. Today I finally dived back into that ugly mess and did something I should have done years ago. I made it faster by moving some of the enumeration code (tight loops that call the hand comparitor thousands of times) directly into the C code. Poki is feeling much peppier today, and that makes me happy.

Leave a Comment