Indiana Poker Programming Contest Computers Playing Poker

Running the server

Starting the server

If you followed the  directions in the Getting Started guide, then you'll already have a running server.  Basically, once you have GlassFrog compiled, all you need to do is run the run.sh script in the GlassFrog directory:

user@indiana$ ./run.sh
Server started at Fri May 21 02:30:09 EDT 2010
PORT = 9000
TIMEOUT = 10000
DUPLICATE_POLICY = NEVER

Creating a room

Each server is composed of multiple rooms. To create a room, use the tools/matchConstructor.py script. The script takes a list of arguments that defines the rules of the room along with optional arguments defining the bots. (Hint: run the script with GlassFrog/ as the working directory.) The arguments are

tools/matchConstructor.py roomName numberOfHands gameDefinition randomSeed

  • roomName—a custom name for the room.
  • numberOfHands—how many rounds the game will last.
  • gameDefinition—the name of the rules file as found in GlassFrog/gamedef/.  2Player.limit.gamedef.xml is the one you should be using.
  • randomSeed—a number that will seed the random number generator.  Same seeds will identical decks of cards.  Use "RANDOM" if you don't want to choose.

Additionally, matchConstructor.py takes extra arguments for automatically starting bots to populate the room.  Just tack on the following arguments to the end of the above command.

AAAIPLAYER playerName buyIn LOCAL pathToScript

  • playerName—the name of the player that will show in output and logs.
  • buyIn—the default is 1000.
  • pathToScript—the path to the startme.sh script that takes two arguments. You can try running acpcChump.py with scripts/startme.sh.

Starting a bot vs. bot game

This will start a match between two acpcChump.py bots.

user@indiana$ tools/matchConstructor.py \
> "myRoom" 2000 2Player.limit.gamedef.xml 42 \
> AAAIPLAYER PLAYERONE 1000 LOCAL scripts/startme.sh \
> AAAIPLAYER PLAYERTWO 1000 LOCAL scripts/startme.sh
New room added successfully on port:9003

The match should finish in a few seconds. Log files can be found in GlassFrog/logs/.

Starting a bot vs. human game

This is a great way to test your bot interactively. You first have to create a room with only one bot, and then start the Swordfish GUI separately.

user@indiana$ tools/matchConstructor.py "myRoom" 2000 2Player.limit.gamedef.xml 42 \
> AAAIPLAYER MrComputer 1000 LOCAL scripts/startme.sh
New room added successfully on port:9003

user@indiana$ cd ../Swordfish
user@indiana$ ./run.sh

Then, select your created room in the tree menu.

The game should start immediately after connecting.

You can also create human vs. human games by creating an empty room and running two instances of Swordfish.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

If you have a question, consider using the contact form instead.


No trackbacks yet.