Getting started
It is highly recommend that you develop on Unix because the server software relies heavily on bash scripts and Python. It is possible to develop on Windows, but it will probably be easier to do as the Romans do. Note that the competition will be run on a Linux machine.
For Windows users
It is possible to develop and run the poker software on Windows. You will need to use our distribution of the ACPC software that contains cross-platform-compatibility fixes. Additionally, you will need Python for Windows to run the tool scripts. The most important thing to change are the startme.sh scripts that start the bot (see the section below on the ACPC server software).
Sun Java 6
First of all, you will need Sun Java 6 if you don't have it already. The poker software only assumes Java 5, but we will be using Java 6 on our server and you are welcome to use Java 6 as well. If you are using Ubuntu or a similar distribution, note that Ubuntu ships OpenJDK instead of Sun Java. The Swordfish GUI (and possibly other components) will not work with OpenJDK. Additionally, since Ubuntu 10.04, Sun Java has been moved out of the default repositories to the "partner" repo. To switch to Sun Java on Ubuntu 10.04 Lucid Lynx, run the following commands:
sudo apt-add-repository "deb http://archive.canonical.com/ lucid partner"sudo aptitude updatesudo aptitude install sun-java6-jdksudo update-alternatives --config javaand choose Sun Java
Netbeans
The server software is organized as NetBeans projects. While not strictly necessary (since it uses Ant build scripts), you will find that compiling and navigating the code is much easier with Netbeans. You can simply install Netbeans via APT or your native package manager or download it from http://netbeans.org/downloads/ (choose the Java SE option).
ACPC Server Software
We are using University of Alberta's Annual Computer Poker Competition server. Download the source package: IPPC Poker Software 20100522 and extract it. Open all of GlassFrog, Swordfish, and IndianaPokerBot up in Netbeans. You might encounter an error saying that there are reference problems.
To fix it, change the project's properties to use JDK 1.6 instead.
Now, building the project should go off without a hitch. To run the server, use GlassFrog/run.sh, as it sets a few memory settings. You should see something like
user@indiana$ ./run.sh Server started at Fri May 21 02:30:09 EDT 2010 PORT = 9000 TIMEOUT = 10000 DUPLICATE_POLICY = NEVER
This means that the server is up and running on port 9000 of your machine.
If you are using Windows, note that you will have to convert shell scripts to cmd scripts. Conversion is pretty simple, as most of the shell scripts are one-liners. For example, compare GlassFrog/scripts/startme.sh
#!/bin/bash ./acpcChump.py $1 $2
with GlassFrog/scripts/startme.bat:
acpcChump.py %1 %2
Note that Windows cmd will automatically look in the working directory for the script, and that arguments are denoted with percent signs instead of dollar signs.
Alternatively, you can install Cygwin, which provides a Unix subsystem for Windows, including bash.




May 24th, 2010 - 16:53
running the GlassFrog gives this error
>> ./run.sh
Unable to access jarfile dist/GlassFrog.jar
But, since the project is imported into NetBeans, one could click the Run Button, and the Server appears to start just fine.
(Mac OS X 10.6.3)
May 24th, 2010 - 16:58
GlassFrog.jar is created when the project is built, so you just need to build the project (either in NetBeans or with Ant) and dist/GlassFrog.jar should be created. After that, the run.sh script should work as normal. Note that I haven’t yet tested the software on Mac, so please report any issues you find.