QuagentClient

API for the Quake Agents platform in Python, Matlab/Octave, and XSB Prolog

The file quagent_client.zip contains API’s that that I wrote to enable easy access to the Linux-based Quagents (Quake Agents) platform. Quagents uses a client/server model that passes messages through socket calls. My code does the socket calls for you, so you don’t have to write socket code to use Quagents. The API follows the Quagents communication protocol, and I have tested all the methods except the XSB implementation of LOOK. Here’s what you need to do:

  • Follow the instructions on the Quagents: Building the System page to download and build the Quagents project. I was unable to get the project to compile as-is under Fedora 7. I fixed this this with the following modifications:
  • Check with your system administrator about what ports are available on the host machine where you’ll be running Quagents. Quagents is hard-coded, in quake2ur-20050512/src/quagent/quagent_server.c, to use port 33333. You may want to ask you system administrator what ports you can use, modify this file appropriately, and re-compile.
  • Download and unzip quagent_client.zip.
  • If you’re using Octave, you’ll need the sockets package. If it’s not already installed on your system, you can get it here. For Matlab, I’ve implemented the necessary socket calls for you, using Java. The QuagentClient constructor detects whether you’re using Octave or Matlab, and calls the appropriate socket code automatically.
  • Launch the server using the quake2ur shell script.
  • On the same host machine, change to the appropriate directory (matlab, python, xsb) and run the test program. A bot should appear, turn around, run a few steps, and die. If you had to change the port number in the Quagents server, you’ll have to change it in the line that invokes the client (first line in the test program).

Please contact me with any questions or suggestions.