poker.py
I spent a few days learning enough python to write a hand evaluator. Python’s seamless use of extremely large numbers makes some neat tricks involving prime numbers that would be tricky in languages limited to 64-bit integers extremely easy. (more…)
LAMP, AJAX…ro-sham-bo!
I used to be a web developer.
Even as I write that, I don’t believe it. For about four years during the late nineties and early naughties, I worked exclusively developing COM components for use behind ASP pages. But, when I made the jump to the dotnet universe, I also jumped back to building desktop applications. I learned the rudiments of ASP.NET back in 2001, but never used it professionally. Six years later, what I learned is both faded and obsolete.
I’ve never really accepted that I’m not a web developer anymore. This site is a perfect example of that. Currently, it’s just a blog, but I’ve always had an eye towards making it a fully-functional website with a front page, articles and everything.
Still, it’s got to be quieter than playing against Matusow.
As I write this, Phil Laak and Ali Eslami should be playing no limit Texas hold ‘em against a computer program known as Polaris for the benefit of the Association for the Advancement of Artificial Intelligence (AAAI.)
Back in New York, plans going forward
Wifezuki and I returned from Las Vegas early Sunday morning and have spent the day recovering from the travel, the vacation, and jet lag. Now that I’m settled in and rested, I’m looking forward to getting on with poker, programming, and building up this site to more than just a blog.
WSOP & WCF
Just a quick update: I haven’t had much time to do anything about HomeGame in the last week as I’ve been focused on getting to the WSOP. Packing my bags, wrapping things up at work, extracting cash from my bank, and getting in as much poker as I can before leaving for Vegas have left me with almost no time.
I did start reading Programming WCF Services by Juval Lowy this week and it’s forced me to re-evaluate my approach to the transport protocol for HomeGame. Originally, I was going to write about the idea of HomeGame as a protocol, along the lines of something like HTTP or POP3. The idea was clean and elegant and would allow easier debugging through telnet using a client like puTTY. In that model, HomeGame would open a port and listen for text-based messages and reply with text-based responses.
Filling the toolbox for HomeGame
Since HomeGame is the first major project I’ve undertaken at home in a few years (and a couple of computer upgrades,) I don’t really have what I would consider a “shop” at home. I have a compiler of course, but I’m talking about the tools and libraries that end up being needed in any project of this size.
The Big Project
One of the things that prompted me to start this blog was to write about the project I’m starting, It’s called HomeGame.
The basic premise is this: Nearly all Internet games are played client-server style. There’s one big server that’s responsible for keeping track of score, dealing cards, and basically being the house. But, that’s not the only way to play the game.
Quantifying starting hands
I’ve got a Big Project I’ll be talking about shortly, but I wanted to kick out an interesting problem that’s going to be part of the bigger project. The question is: How do you numerically rank starting hands in Texas Hold ‘Em?
I’ve seen plenty of systems which categorize starting hands into groups. But, what I need is a programmatic way to give an absolute numeric value to all two-card starting hands. For a first iteration, it should fulfill at least all the following:
AA > KK > AK
AKs > AKo
AKs ~= QQ
22 > A2o > 72.
This is surprisingly difficult.