Poker Project: Poker Fighter

Summary

This project was a term-long project implementing a full-scale poker game with a GUI frontend, AI players, etc. This project was for the Computer Science 303 (Software Development) class and was written in Java. This project was a team project and my partner was the illustrious David Kawrykow. This project extensively uses Object Oriented Design Patterns (Push Based Observer, Decorator, etc.) with an easy to use interface for future extensions. Most of the time was spent on building the AI and the actual gameplay itself. The game of poker has many special cases when dealing with various chip stacks and "All-in" calls in particular. In addition, making an extremely fast and playable game was very difficult with the AI taking up the bulk of this. In the end, an infinite number of AI was made by parametrizing the "brain" of an AI player: a value for how they bet in the first round of betting, a value for how they discarded cards (an aggressive player tries for ridiculous hands while a conservative one tries for "low value" hands like pairs), a value for the second round of betting, a value for how often they bluffed, a value for how much history they remembered, a value for how often they could "catch" someone bluffing, etc. In the end, we choose from 9 of the characters created to add to our game to represent a range of styles and difficulties posed to the human player.

A summary of the project is available on the course website.


Playing The Game

Playing the game should be intuitive. First download the game below, then in the command line, go to the directory the JAR file is located in and type: "java -jar poker.jar". The first screen you should see should look like this (or something similar depending on your operating system):

After this screen, you progress to a screen where you choose the specifics of the character and game you want to play (for example: tournament or arcade versions, the difficulty of the game, etc.). For the arcade version, you will need to choose your opponents (note that each opponent has a different AI "brain" and will thus behave radically different...choose your opponents carefully)-a good thing to keep in mind is that the character plays somewhat like his namesake (for example, Mike Tyson usually plays very aggressively). The opponent selection screen looks like this:

After this, you will go to the game itself and play against your opponents.

If you chose the tournament option and not the arcade one, a tournament tree should appear in the next screen and then you will enter your first tournament bracket. To win the tournament structure, you need to win 3 rounds of poker, with each round presenting ascending difficulty in terms of your AI opponents.

A few screenshots of the game itself:


Source Code

The source code should be viewable in the JAR file that is provided at the bottom of this document. classes. The original JUnit tests used to test the many classes are provided in the JAR file as well. This project has over 10,000 lines of code and is subdivided into many packages which are further subdivided into individual classes. The function each package provide to the game should be inituitive (the ai package houses the AI, the gui package has code for the GUI, etc.).


Download Game

I have made a JAR file available so that it can be played. Download it, then type "java -jar poker.jar" in the command line.

File: poker.jar