We have put a significant amount of time into this code and have attempted to make the install procedure as simple as possible. That said, it's certianly not trivial. If you have questions about installing Keepaway, we encourage you to ask us! We plan to continually update this document as people find confusing bits.
Linux RoboCup Soccer Server
The RoboCup Soccer Server consists of 3 parts: base files shared among
the modules, the server itself, and a monitor program for
visualization. Follow these instructions to install them.
1. If boost is already installed on your system, set BOOST_ROOT to point to its location. For example, if it is in /usr/local/, do the following:
export BOOST_ROOT=/usr/local/boost_1_34_1
Proceed to step 3.
If it is not installed, set BOOST_ROOT to the directory that you'd
like to have boost installed in.
2. If boost is not already installed, download "boost_1_34_1.tar.gz" from http://boost.org, and build the boost libraries. (Again, you can use an installation directory different from /usr/local/, which is only provided here as an illustrative example.) This can be a time-consuming operation. Go grab a coffee. Relax, read the rest of this document, and finish installing Boost.
mkdir boost-src
mv DownloadDirectory/boost_1_34_1.tar.gz boost-src/
cd boost-src
tar zxf boost_1_34_1.tar.gz
cd boost_1_34_1
./configure --with-libraries=filesystem,program_options --prefix=$BOOST_ROOT
edit the Makefile, and change the line BJAM_CONFIG= so that
it reads BJAM_CONFIG="--layout=system"
make
make install
export BOOST_ROOT=/usr/local/boost_1_34_1
3. Update the PATH and LD_LIBRARY_PATH environment variables. They can
be changed permanently by editing the ~/.profile,
~/.bashrc, or the startup file used by the
shell. Alternatively, they can be aleterd temporarily as follows:
export PATH=$PATH:$RCSSBASE/bin
export
LD_LIBRARY_PATH=$BOOST_ROOT/lib:$RCSSBASE/lib:$RCSSBASE/lib/rcssserver/modules
4. Create the directory "rcss", and set RCSSBASE to point to it. In this example, rcss is created in /user/username. Download "rcssbase-11.1.0.tar.gz", "rcssmonitor-11.1.1.tar.gz" and "rcssserver-11.1.2.tar.gz" from http://sourceforge.net/project/showfiles.php?group_id=24184, and install them in rcss.
mkdir /user/username/rcss
export RCSSBASE=/user/username/rcss
mkdir rcss-src
mv DownloadDirectory/rcssbase-11.1.0.tar.gz rcss-src
mv DownloadDirectory/rcssmonitor-11.1.1.tar.gz rcss-src
mv DownloadDirectory/rcssserver-11.1.2.tar.gz rcss-src
cd rcss-src
tar zxf rcssbase-11.1.0.tar.gz
tar zxf rcssserver-11.1.2.tar.gz
tar zxf rcssmonitor-11.1.1.tar.gz
cd rcssbase-11.1.0
./configure --prefix=$RCSSBASE --with-boost=$BOOST_ROOT
make
make install
cd ..
cd rcssserver-11.1.2
./configure --prefix=$RCSSBASE --with-boost=$BOOST_ROOT
make
make install
cd ..
Your sysadmin may have put X11 in a nonstandard location. To
get around this, first try to find your system's X11 include directory:
locate X11/Xlib.h
Add the path you find that contains this X11 directory (called something
like /blah/X11R6/include) as a default compilation option:
export CPPFLAGS=-I/
For example:
export CPPFLAGS=-I/usr/X11R6/include
cd rcssmonitor-11.1.1
./configure --prefix=$RCSSBASE --with-boost=$BOOST_ROOT
make
make install
cd ..
cd ..
If you've done the default installetion (i.e., without the --prefix flag), you may consider adding /usr/local/lib as well to LD_LIBRARY_PATH.
Continue by installing the UT Austin Villa Keepaway Player.
Mac: Developer Tools and
X11
1) You need to install the latest version of Xcode, from http://developer.apple.com/tools/xcode.
If you are a power user and for some reason had to change the default
gcc to 3.3 at some point, be sure to change it it back to 4.0 using
gcc_select 4.0
2) You need to have X11 installed. If you don't have it already, go
to http://developer.apple.com/opensource/tools/runningx11.html
and http://developer.apple.com/opensource/tools/X11.html.
Quoting from the website:
"X11 is available as an optional install on the Mac OS X v10.3 Panther, and Mac OS X v10.4 Tiger install disks. Run the Installer, select the X11 option, and follow the instructions. You should install the X11 SDK as well, which is included on the Panther Developer CD. If you intend to download X11 source code and build your own binaries, you will need the tools and headers included in the SDK."I'm not sure what the case is with Leopard, but it's probably about the same.
Mac: Install Boost
1) If boost is already installed on your system, set BOOST_ROOT to
point to its location. For example, if it is in
/usr/local/boost_1_34_1, do the following:
export BOOST_ROOT=/usr/local/boost_1_34_1
Bost is installed - skip the remaining steps in this section.
If Boost is not installed, set BOOST_ROOT to be the directory where
you would like to install Boost.
2) Otherwise, download boost_1_34_1 from http://boost.org.
3) Build the boost libraries. Also, you may wish to install it
somewhere other than default. In my case, I decided to put it in its
own directory:
./configure --with-libraries=filesystem,program_options --prefix=$BOOST_ROOT
edit the Makefile, and change the line BJAM_CONFIG= so that
it reads BJAM_CONFIG="--layout=system"
make
sudo make install
You can change --prefix= to a path in your home directory if
you don't have root access. In that case, you don't need to use
sudo in that last line.
4) For convenience, set BOOST_ROOT environment variable to the
location above, e.g., if you use bash and placed boost in
/usr/local/boost_1_34_1, then do this:
export BOOST_ROOT=/usr/local/boost_1_34_1
or, if you use csh:
setenv BOOST_ROOT /usr/local/boost_1_34_1
Mac: Install Soccer Server
1) download rcssbase-11.1.0, rcsslogplayer-11.1.1, rcssmonitor-11.1.1,
rcssserver-11.1.2 from http://sourceforge.net/project/showfiles.php?group_id=24184
and untar them into a new directory called rcss. You can do this by
creating a new folder and putting the .tbz2 files there, then
double-clicking them.
2) For convenience, set an environment variable for rcss, e.g., if you use bash and your username is username and you put rcss in your home directory, then:
export RCSSBASE=/Users/username/rcss
or if you use csh:
setenv RCSSBASE /Users/username/rcss
3) In your shell startup script, set your
DYLD_FALLBACK_LIBRARY_PATH to include all the paths to all
the libraries you've just added:
export
DYLD_FALLBACK_LIBRARY_PATH=$BOOST_ROOT/lib:$RCSSBASE/lib:$RCSSBASE/lib/rcssserver/modules
or:
setenv DYLD_FALLBACK_LIBRARY_PATH
$BOOST_ROOT/lib:$RCSSBASE/lib:$RCSSBASE/lib/rcssserver/modules
If you didn't customize $BOOST_ROOT and instead let things install
into a default location (i.e., if you omitted the --prefix option),
then you still need to add /usr/local/lib.
4) Add the $RCSSBASE/bin directory to your path:
export PATH=$PATH:$RCSSBASE/bin
or if you use csh:
setenv PATH $PATH:$RCSSBASE/bin
then type:
rehash
5) cd to rcssbase-11.1.0 and configure and make using:
./configure --prefix=$RCSSBASE --with-boost=$BOOST_ROOT
make
make install
6) cd to rcssserver-11.1.2 and configure and make using:
./configure --prefix=$RCSSBASE --with-boost=$BOOST_ROOT
make
make install
7) cd to rcssmonitor-11.1.1 and configure and make using:
./configure --prefix=$RCSSBASE --with-boost=$BOOST_ROOT
make
make install
6) cd to rcsslogplayer-11.1.1 and configure and make using:
./configure --prefix=$RCSSBASE --with-boost=$BOOST_ROOT
make
make install
The rest of the install instructions are the same for Mac as Linux, except that you will have to have your X11 aplication running for visualization.
UT Austin Villa Keepaway Player
1. Download keepaway-0.6.tar.gz from http://www.cs.utexas.edu/~AustinVilla/sim/keepaway/tutorial.html.
2. Open the package in the directory in which you would like it installed:
tar zxf keepaway-0.6.tar.gz
3. Now compile the players:
cd keepaway-0.6/player
make depend
make
4. Next, compile and install the tools:
cd ../tools
make
cp hist killserver kunzip kwyzipper kzip monitor winsum $RCSSBASE/bin
cd ..
If you're using a Mac, you'll need one more script:
5. Download pidof and save it in $RCSSBASE/bin.
cd $RCSSBASE/bin
chmod +x pidof
1. Obtain RL-Glue-Keepaway.tar.gz and RandomKeepawayAgent.tar.gz.
2. The first step is to modify the default UT-Austin keepaway players
so that one of the Keepers can use a RL-Glue connection to make
decisions.
mv RL-Glue-Keepaway.tar.gz ~/keepaway-0.6/player/
cd ~/keepaway-0.6/player
tar zxf RL-Glue-Keepaway.tar.gz
make
mv keepaway_RLGlue.sh ../
cd ..
3. Download the trainer code:
http://www.cs.utexas.edu/~AustinVilla/sim/keepaway/download/rcssjava-0.1.tar.gz
Unzip it it a directory (such as ~/keepaway-0.6/rcssjava)
4. Edit keepaway_RLGlue.sh so that the rcssjava path at the top of the file is set correctly.
5. The next step is to build a sample RL-Glue agent that behaves
randomly. Your agent for the RL Competition may be in C, Java, or
Python. We have included a C agent so that you can see what is
required.
mv RandomAgent.tar.gz ~/rl-glue2.0.1/Examples/Network_C/src (or
wherever your local copy of RL-Glue is located)
cd ~/rl-glue2.0.1/Examples/Network_C/src
tar zxf RandomAgent.tar.gz
mv RL_agent.makefile ..
cd ..
make
6. Now that both the RL-Glue keepers and sample RL-Glue agent have
been installed, try running keepaway.
First, start the RL-Glue agent:
~/rl-glue2.0.1/Examples/Network_C/bin/RL_agent
Then, start the Soccer Server and the Keepaway players:
~/keepaway-0.6/keepaway_RLGlue.sh
If everything is working correctly, one keeper will be controlled by the random RL-Glue agent, and two keepers will use the hand-coded keeper policy.