UNR Logo
QUAKE2AI

Introduction

UNR has a large cluster that can be used in conjunction with the Queue Genetic Algorithm (QGA) to distribute the fitness evaluations, so that many are run simultaneously on different processors. You can start a few QGA servers on your own computer, then run hundreds of games on the cluster to do the evaluations for your QGA servers.

The instructions for this page assume that you are using the Python or Chicken Scheme interface to Quake2AI.

Account

See your instructor or advisor to get an account on the cluster.

Once you have an account, use a command like this to connect to the cluster from your own computer:

   ssh mparker@hnode.research.unr.edu

except use your own cluster username rather than mparker. (Make similar substitutions as needed in the rest of this tutorial.)

You may not be able to connect to the cluster from off campus.

If you forget your passphrase, do not enter too many guesses or it will blacklist the computer that you are working from.

lib32

The cluster consists of 64-bit systems, but Quake II, ordinary Python and Chicken Scheme, and some of the pieces of Quake2AI are 32-bit software. The versions and/or support files necessary for running on 64-bit systems can be obtained here.

Copy that archive into your home directory on the cluster and extract it, then add these lines to the end of your .bashrc file:

   PATH="/home/mparker/bin:$PATH"
   LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/mparker/lib"
   LD_RUN_PATH="$LD_RUN_PATH:/home/mparker/lib"

Be sure to substitute your own username for mparker.

Quake II Files

Copy all your Quake II files into ~/scratch/. In the example script below, the directory for using Chicken scheme is qman and the directory for using Python is pyq. Modify the script below if you use different names.

Scripts

Here is a script named submitall that can be used to run experiments using Chicken Scheme:
#! /bin/bash

I=0
while [ $I -lt 4 ]; do
	echo "cd /home/mparker/scratch/qman" > tmpdoqsub
	#echo "killall Xvfb" >> tmpdoqsub
	echo "export LD_LIBRARY_PATH=:/home/mparker/lib" >> tmpdoqsub
	echo "export DISPLAY=:20.0" >> tmpdoqsub
	echo "./q2_clients_duo 127.0.0.1 $184400 ogre.cse.unr.edu 133$I 0.0 4 > /dev/null" >> tmpdoqsub
	echo "sleep 96h" >> tmpdoqsub
	qsub tmpdoqsub
	let I=I+1
done
Be sure to substitute your username and directory names, and use the name of your own workstation rather than ogre.

The script submits 4 sets of tests running the _duo test on the cluster, connecting to a workstation named ogre.cse.unr.edu. You can run this several times, using unique number each time so that there is not a clash if they happen to run on the same cluster node:

   ./submitall 1
   ./submitall 2
   ...
The submitall script for using the Python API is similar, except it uses the pyq directory rather than qman as in the example above.