## austin 0.1.0 Released

austin is a little program that calculates the winning probabilities of Texas Hold ‘Em hands. It accomplishes this by simulating a large number of games among the desired number of players and analyzing the results. Finally, a use for Bayes’ theorem that doesn’t involve spam filtering!

austin was inspired by a conversation a friend and I had last weekend about, well, a program to do this sort of thing. It also gave me an excuse to try out some of the features added to Java 1.5 (or Java 5, or whatever Sun’s marketing team is calling it).

Here’s the README, slightly mangled by WordPress’s insistence that <pre> doesn’t actually mean <pre> (note to self: get around to upgrading to the latest version one of these days):

WHAT IS THIS? ============= austin is a tool for generating statistics about Texas Hold 'Em hands. It helps answer one of the big questions that run through a person's mind when playing: "what are my chances of winning with the hand I have?" austin simulates a large number of Texas Hold 'Em games and collects statistics about how frequently each hand is dealt and how frequently each hand wins. It then computes the conditional probability of a player winning given that he has a particular hand. HOW DO I USE IT? ================ austin takes two arguments: the number of games to simulate and the number of players to include in the simulation. These parameters are specified with the --games and --players command-line options, respectively. For example, to simulate 50,000 games among 4 players, you would do: java -jar lib/austin.jar --games 50000 --players 4 The output will be a table of probabilities associated with each type of hand that appeared during the simulation. For example, part of the output from running the above command might be: HAND DEAL % RAW WIN % WIN % -------------------- ------ --------- ------ ACE ACE off-suit 0.46 1.15 62.35 ACE KING suited 0.29 0.50 42.98 ACE KING off-suit 0.93 1.42 37.96 ACE QUEEN suited 0.30 0.49 40.83 ACE QUEEN off-suit 0.88 1.33 37.69 ACE JACK suited 0.29 0.46 39.38 The HAND column lists each type of hand, sorted in descending order of the ranks of the cards in the hand. DEAL % lists the percentage of times that that particular hand was dealt to a player. Note that different hands have different probabilities of being dealt, since there are more ways to get, say, an ACE KING off-suit than there are an ACE KING suited. RAW WIN % lists the percentage of games that were won by that particular hand. For example, the above table says that 1.15% of the 50,000 simulated games were won by an ACE ACE off-suit. WIN % lists the probability that a player dealt a particular hand wins the game. For example, the above table says that if a player is dealt ACE ACE off-suit, he has a 62.35% chance of winning. The more games you simulate, the more accurate the results will be. WHAT ELSE DO I NEED? ==================== austin was written in Java 5 (a.k.a. Java 1.5), so you'll need the appropriate version of the Java run-time environment installed. It was tested using the one available from http://java.sun.com, so that may be your best bet if you need to get one. The entire program is contained within lib/austin.jar; feel free to copy it to whatever the most convenient location on your system is. If you want to make modifications to austin, you'll need Ant (http://ant.apache.org/) to use the build file. To run the test cases, you'll also need JUnit (http://www.junit.org/). Both of these tools are pretty common in the Java world, so you may already have them. austin is licensed under version 2 of the GNU General Public License. See the file COPYING for all the details. WHAT IF I HAVE QUESTIONS? ========================= Feel free to e-mail the author at kuliniew@purdue.edu. Eventually he'll set up a proper web site for austin.

## 3 Responses

lol…. bayes theorem… a use… :)

The place where I worked as an intern over the summers in college used Bayes’ Rule for submarine tracking and were quite successful. Maybe we can work together to use Bayes’ theorem to predict gas prices? I think we could do it :)

Bayes’ Theorem is the Swiss army knife of probabilities.