Heads Up No Limit Texas Hold 'Em (in Java)
by Michael Rivers

How to Play

Java Code

My Program

My program was designed as a final project for a second term java class. It uses some inheritance, very little polymorphism, and plenty of GUI (Graphical User Interface) components. The greatest challenge in this project was writing the code to identify the best five card hand out of the seven cards available for each player to use (two hole cards plus five community cards). Of course, the next level of code for me to write in the area involves calculating the odds of making a hand of a given strength (flush or a straight) given an incomplete hand. This would be essential to writing a truely intellegent A.I. opponent. Also the A.I. should be able to determine the likelyhood that your hand will beat his based on the cards on the boards, the cards he holds, and your previous betting pattern throughout the game so far.

I wrote this program hoping to get into writing an A.I. opponent, but unfortunately the opponent as of now is set to act randomly. The decission of what action he makes is random, although he calls most often, folds less, and bets even less. This makes him an easy opponent because you can simply place value bets against him, but it was useful for testing because you reach showdowns more often when he calls a lot which allows me to test my hand evaluating code.

Thursday, June 15, 2006 10:58 AM