The Game Theory Explorer (GTE) is a graphical user interface that allows the interactive construction of small to medium size games in extensive and strategic form, and to compute equilibria of these games. GTE is part of the Gambit Project - a library of game theory software. An up-to-date version of the web-application is available via the landing page http://www.gametheoryexplorer.org/ and directly at http://gte.csc.liv.ac.uk/gte/builder/
GTE is written by
This version of GTE is designed to be portable across platforms and runs on Linux, Mac OS X, and Windows.
The GUI is currently implemented as a Flash program in Actionscript (files ending in .as); we refer to this as the client. The game generated by the client GUI is stored in a file format and sent to the server. On the server side, that file is read in, and an algorithm started, for example, to find one or all Nash-Equilibria of the game. This algorithm maybe be a program written in some native code, in particular C for the lrs program. The output of this algorithm is then sent back to the client to be displayed as a solution. These issues are addressed as follows:
GTE can be installed in three different ways:
In this README we first provide detailed installation instructions for the SERVER version (here). Then we provide some notes on developing just the CLIENT with Eclipse (here). Finally we provide some instructions on using a "drawing-only" version, with no server components (here).
If you want to contribute to the gte project, as a first step you should follow the SERVER installation instructions and create and deploy the war file gte.war on a local Jetty server.
This requires a number of installations:
After all these installations, any update of the project only requires re-compiling the server and client.
In the instructions that follow you are told to set environment variables like FLEX_HOME and JETTY_HOME. These should be set LOCALLY on and specifically for your computer and stay in build.properties (see example in repository).
Download Java SDK (at least Java SE 6) at: [http://www.oracle.com/technetwork/java/javase/downloads/index.html] (http://www.oracle.com/technetwork/java/javase/downloads/index.html "Java Download")
LINUX
$ sudo apt-get install sun-java6-jdk
WINDOWS
1.1 Download - http://www.oracle.com/technetwork/java/javase/downloads/
1.2 Add bin directory to path
1.3 Add JAVA_HOME
environment variable (makes sure it points to the SDK, not JRE)
OS X
OS X 10.6 and 10.7 with a Java SDK suitable for gte.
Confirm you have the latest version by running "Software update..." from the Apple menu.
Set the environment variable JAVA_HOME
to the installed JAVA SDK
Install ANT
LINUX/WINDOWS:
OS X: OS X 10.6 and 10.7 ships with ant (in /usr/bin/ant
)
LINUX/OSX:
JETTY_VERSION=7.6.1.v20120215
wget http://download.eclipse.org/jetty/$JETTY_VERSION/dist/jetty-distribution-$JETTY_VERSION.tar.gz
tar xfz jetty-distribution-$JETTY_VERSION.tar.gz
JETTY_HOME
to the extracted JETTY directoryjava -jar start.jar
WINDOWS:
java -jar start.jar
Applied to SERVER and CLIENT
You may need to complete the following additional steps on Linux/OSX:
4b. Install "gflashplayer"
LINUX
4b.1 cd ${FLEX_HOME}/runtimes/player/10.1/lnx
4b.2 tar -zxvf flashplayerdebugger.tar.gz
4b.3 ln -s ./flashplayerdebugger ./gflashplayer
4b.4 Add directory from [4b.1] to PATH
OS X: In ${FLEX_HOME}/runtimes/player/10.1/mac
there is a DMG file,
"Install Adobe Flash Player Debugger 10.1.dmg". Double-click in Finder to
mount the disk image, which contains an installer, "Install Adobe Flash Player
Debugger". Double-click the installer to run. If you have Adobe Flash Player
newer than 10.1 installed, the installer will complain and terminate. In this
instance, the Flash Player Debugger.app is also present in the folder.
Double-click to unzip, and drag the application the the Applications folder (or
wherever you want to put it).
By now you should have 4 environment variables: JAVA_HOME, ANT_HOME, JETTY_HOME and FLEX_HOME
pointing to the corresponding directories.
LINUX: Install gcc as a C-compiler (Ubuntu):
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
OS X: tbc (options include installing Xcode or using brew)
WINDOWS: Download cygwin (setup.exe) from: http://www.cygwin.com/. Start the setup.exe and install the following packages:
Choosing these packages implies that setup.exe detects dependencies and autmatically will install the following packages on its own:
After setup completes add the bin directory of your cygwin install dir (e.g. c:\cygwin\bin) to your PATH environment variable.
LINUX/MAC/WINDOWS:
From the root directory of the respository (which contains build.properties), execute the compileComplete
ANT-target with
ant compileComplete
The target compiles the servlets, FLEX GUI, native Code, packs the compiled code into a War-file and deploys it to JETTY (webapps) and starts the JETTY server. (TODO: Add info on other targets such as makeWarFile.)
127.0.0.1:8080/gte
If http://127.0.0.1:8080/gte/ ever shows the browser message
Unable to connect
Firefox can't establish a connection to the server at
127.0.0.1:8080.
then the jetty server is down, and you need to start it (in JETTY_HOME
) with
`java -jar start.jar`
Or if you want to start jetty so that it can easily be stopped then use
`java -DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar &`
And then to stop it
`java -DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar --stop`
If you get an error while starting JETTY that says you do not have a Java SDK installed,
please follow the instructions here:
[http://wiki.eclipse.org/Jetty/Howto/Configure_JSP](http://wiki.eclipse.org/Jetty/Howto/Configure_JSP
"Jetty No Java SDK Help"). In general it says that you have to
add -Dorg.apache.jasper.compiler.disablejsr199=true
to the Jetty.xml (JETTY 7.5.0 and prior)
or uncomment this line in start.ini (JETTY 8.X and later).
See servlet_howto.txt
The CLIENT version is only for developing the GUI.
You do not need to execute ANT targets on the CLIENT version, because you only modify ActionScript files and Eclipse helps you to compile and test your code. Access the code from GitHub, change the GUI, submit the code back to GitHub
If you want to compile, test and run the complete GTE you need to setup the SERVER version. Access the code from GitHub and run the compileComplete ANT-target.
Download Eclipse IDE (HELIOS or INDIGO) for Java EE Developpers 32-bit version at: http://www.eclipse.org/downloads/. Do not use the 64-bit version or the new JUNO release of eclipse because it does not work with the FlashBuilder plugin later.
gui-builder/src/les/math/games/builder/view
,
right click on Main.mxml and choose set as default application.Optional: If you see only a grey screen adjust the security settings of the FlashPlayer. Right-Click on the grey area and choose Global settings from the popup menu. Navigate to Advanced and scroll down. Click on Trusted Location Settings and add the directory where the Flash-File is executed to the list of trusted locations.
To run GTE without server components means just to use the drawing functionality. The drawing functionality is entirely coded in Flex and therefore needs only access to the SWF file.
Specify the output directory of the GTE_WSC version in build.properties using the GTE_WSC variable
Build GTE_WSC using the ANT target: makeWithoutServer
Go to the output directory specified in (1) and extract the Zip file
Open index.html with your web-browser
If you don't see the GTE IDE you have to add the output directory to your trusted sites in the global flash settings. You can edit your settings using this link:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html#119065
Open index.html with your web-browser again