Source Code
Saturday, February 26th, 2005I get a lot of requests for me to open up my source. As far as I can tell, it is mostly from people who just want a free lunch. There are several excellent examples of poker code out there. Brecware, which is linked to on the sidebar, is an excellent example of a straightforward implementation of an equity evaluator. The pokersource project, also linked to on the sidebar requires a bit more work to understand since it’s scope is quite larger.
That said, I’ve finally put some code up for anyone to play with. It is very simple, and the driver program doesn’t do much. In fact, it’s just a clone of the fish example from pokersource. This code is written in Java.
It is a good illustration of the kinds of basic optimizations you can perform for computation intensive applications. There’s a fair amount of bit-twiddling, and lookup tables used to make the most out of a slow language.
I stopped coding in Java four years ago because I came to really dislike it. After working in it for a couple of years I found that it just didn’t meet my needs at the time. In particular, the performance was horrid, especially when dealing with GUI applications. I now develop in C++, so the code in this library is dormant. There may be bugs, poor documentation, and strange semantic problems with the code. As such, I’m providing it with no warranty whatsoever. If it frags your system, so be it.
So if you’ve been looking for a example of poker code written in Java, enjoy. If you develop anything interesting, let me know and I’ll check it out.
Download jpoker