This page is supposed to contain a collection of all the crappy code that I, for some reason or another, have chosen to inflict upon the public at large. All programs found here are free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
All programs are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Software Framework for Game Analysis
gtf is a framework, written in java 1.5, for analysing two-player zero-sum games. It is written solely for my own research needs, and may therefore seem unapproachable to others. It is documented on a want-to-do basis, and since it is not something I want to do, documentation is scarce.
What does it do?
- It supplies an interface between analysis-algorithms and games, with a growing libriary of both games and algorithms.
- It does not contain any graphical user interface; just the plain java classes.
- The games are specified by either implementing a java class to generate the game tree, or by using the ".efg" format of Gambit. It also allows you to export defined games to the ".efg" format.
Why use a programming language to specify games?
Because it makes it a lot easier to specify complex games, if you have the full expressive power of a programming language, such as java.
How to obtain gtf
How to use gtf
Download and compile it (e.g. using the sun java compiler). The framework is command-line parameterized with the name of the class implementing whatever algorithm you would like to run, and the name of the class describing the game you would like to analyze. The syntax is:
java gtf.Analyze <name of algorithm class> <name of game>
java gtf.Analyze gtf.EpsilonRealKMSVisitor gtf.examples.AceOfSpades
The above runs the algorithm described in our paper on finding a sequential equilibrium, on the simple game of Guess the Ace from the same paper. The current version of the framework is work in progress, so I would recommend filtering stderr away. If done on the above command, the following should be written to stdout:
gtf.EpsilonRealKMSVisitor An optimal strategy: p1: do not play: 1 play: 0 p2: guess ace of spades: 0 guess other card: 1 Value: 0 ~0
The output displays the behavioral strategies, that is the probability distribution on each action at each information set. The value is displayed at the bottom followed by a sanity check of the equilibrium. If it says ~0, it is indeed an equilibrium.
The games also have the possibility of begin parameterized. For instance the game gtf.examples.SingleCardPoker is the simplification of heads-up limit texas holm'em, where each player receives a single card, and after a single betting round, in case of a showdown, the player with the highest card wins. The game is parameterized with the total number of cards in the deck, the number of chips each player has beyond the ante and finaly the size of the ante. The syntax is:
java gtf.Analyze gtf.EpsilonRealKMSVisitor gtf.examples.SingleCardPoker <decksize> <stacksize> <ante>
For instance three cards, two chips and an extra as ante would be:
java gtf.Analyze gtf.EpsilonRealKMSVisitor gtf.examples.SingleCardPoker 3 2 1