Keepaway Documentation Print E-mail

 For credits and historical information about this document, please jump to the end here.

The Keepaway code is now distributed with the rl-competition software in domains/keepaway

 Note: There are still a few sticky issues with Keepaway.  There can be a few hiccups on different flavors of Linux depending on the versons of Flex and GCC that are installed.  Also, for some reason we've need to create different run scripts from Mac and Linux.

 

Overview
Three separate pieces of software need to be installed in order to run Keepaway for the RL competition:

  1. X11: Linux or Mac
  2. Boost
  3. RL-GLue Keepaway Module
Below are instructions for doing the first step under Linux and Mac OS X. The second and third steps are the same, regardless of the platform. The Linux installation has been tested on Ubuntu, Red Hat, and the MAC OS X on Tiger and Leopard. The shell commands listed below are for the bash shell, and may have to be changed slightly for other shells. For instance, "export variable=value" under bash should be replaced with "setenv variable value" under csh.

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 certainly 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.

In all of this, when we write rl-competition/, we mean /path/to/wherever/you/installed/rl-competition  

X11 - Linux

It's possible that you may need to install some X11 packages for keepaway. If you're not sure, then just try compiling keepaway (following the instructions below). If you run into problems, try installing packages name X11 or X11-dev using your package manager (rpm, apt-get, etc.).  

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
Remember the path you find that contains this X11 directory. It will be called something like /blah/X11R6/ (leave out the /include at the end of the path). You will need this path for step 3 (building Keepaway)


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.
3) Some people don't know that they can still use X11 apps from inside Terminal.app. You just need to set your DISPLAY environment variable: export DISPLAY=:0.0
or
setenv DISPLAY :0.0
and it's also helpful to add /usr/X11R6/bin to your PATH.

Boost
You need Boost >= 1.33. If running on a Linux system, this is probably already done for you. Try building the boost test in rl-competition/domains/support/misc/boost_test:
$> cd rl-competition/domains/support/misc/boost_test
$> make
$> ./boost_test

If it compiles and runs, then boost is already installed.

To find the path for boost:
$> locate boost/version.hpp
This will give a directory like /usr/local/include/boost-1_33_1/boost/version.hpp, in which case the BOOST_ROOT (needed in step 3 below) would be /usr/local

If not, then it's likely easily obtained by using your package manager; search for packages named "boost" and/or "boost-dev". Otherwise, follow instructions below.

Note: If you are not comfortable installing boost or are not sure what to do next, we have included a script to install it for you. This script will install a local copy of boost, inside the rl-competition software distribution.  You do not need root access to install it.  Be warned, if some files are missing on your computer, you may see a MASSIVE amount of errors when building.  It is probably still working.  Also note, this can take up to 30 minutes. 

To run the script:
$>cd rl-competition/domains/support
$>bash install-boost.bash

Or, to manually install boost to your home directory, do the following:
$>cd rl-competition/domains/support/misc
$>tar xjvf boost_1_34_1.tar.bz2
$>cd boost_1_34_1
$>./configure --prefix=$HOME
$>make
$>make install

If you see a message indicating that not all the libraries were built properly, that is OK. It is likely that the optional python libraries were not built.

Lastly, create this symbolic link.
$>cd $HOME/include
$>ln -s boost-1_34_1/boost

Now, build and run the test program in misc/boost_test to verify that it worked.

RL-Glue Keepaway Module

1. Edit rl-competition/domains/keepaway/Makefile and set BOOST_ROOT and X11_PATH to the appropriate locations.

2. Build the project:

$> cd rl-competition/domains/keepaway
$> make
If the build process fails then most likely Boost or X11 are not set up correctly.

3. Edit rl-competition/domains/keepaway/keepaway_RLGlue.sh and set BOOST_ROOT to the appropriate location.

4. We have provided sample agents  in Java, C, and Python that behave randomly as part of the competition distribution (these agents works in all domains).  They will be built when you do the main "make" for the competition.  In case you haven't done that yet.

$> cd rl-competition
$> make

5. Now that both the RL-Glue keepers and sample RL-Glue agent have been installed, try running keepaway.
First, start an RL-Glue agent:
$> cd rl-competiton/agents/randomAgentJava
$> bash run.bash

Then, in a different console window, start the Soccer Server and the Keepaway players:
$> cd rl-competition/domains/keepaway
$> ./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. If you have problems getting keepaway installed we encourage you to ask questions on the forum.

Note 1: If an error such as the one below is encountered. Try starting X11 prior to running keepaway.

    *** ERROR file="2dview.C" line=1119    Could not open display! 

Note 2: The run script makes use of some syntax which may break with older versions of bash. If this happens please contact us with your platform information.

 

 Contributors and Historical Information

 This version of the instructions, let's call it version 2.0 is based on instructions from Matt Taylor:
http://www.cs.utexas.edu/~mtaylor/instructions.htm

 Those are in turn based on the University of Austin at Texas Keepaway project here:
http://www.cs.utexas.edu/~AustinVilla/sim/keepaway/

 Contributors (roughly in order of recency):

Change Log:

Matt Radkie Mar 10-17 2008

  • Fixed end_episode so agent_end() is not called if agent_start() is not called.
  • Parameterized the run script (keepaway_RLGlue.sh)
  • Changed /bin/sh to /bin/bash to solve the ubuntu problem. One run script now runs on all tested platforms.

Brian Tanner Jan 17 2008

  • Cosmetic updates to the instructions

Mark Lee Jan 10 - 14 2008 (with suggestions from Brian Tanner)

  • Updated keepway_RLGlue.sh to be backwards compatible with older versions of sh (so it works on Brian's Ubuntu).
    • Removed C-Style Syntax for If Statements and Loops
    • Changed inline addition operations to be backwards compatible ($[port +1] didn't work)
  • Unpacked RL-Glue-Keepaway.tar.gz into domains/keepaway/keepaway-0.6/player
  • Moved keepaway_RLGlue.sh into the main keepaway directory and changed paths within the script accordingly
  • Unpacked rcssjava-0.1.tar.gz into domains/keepaway/rcssjava
  • Added virtual destructors to classes in domains/keepaway/keepaway-0.6/player/Objects.h
  • Added missing initializers to variables in domains/keepaway/keepaway-0.6/player/WorldModelUpdate.cc
  • Changed outdated rl-glue files in domains/keepaway/keepaway-0.6/player to be symlinks to actual rl-glue files in /system/RL-Glue/...
  • Instead of building player, moving binaries, unpacking other player over existing player, rebuilding, made it all one step
  • Made moving the built binary tools part of the makefile instead of separate step
  • Created a makefile to build rcss-base, rcss-monitor, rcss-server, tools, and the player in one rule
  • Consolidated boost installation instructions
  • Put all paths in Makefile and run script instead of relying on environment variables
  • Removed the sample agent (existing random agent will work just fine)
  • Moved pidof script to domains/keepaway/rcss/bin and changed to executable permission

Matthew Taylor et al. Nov 2007

Known Bugs

  • Has been tested on OS X Tiger and Leopard (Power PC and Intel), Ubuntu 7.04 (Fiesty Fawn), Random Linux on some department machines
  • Has NOT been tested and is not expected to work in Cygwin
  • Building rcssserver gives errors on some platforms.  Things like:
     `yy_current_buffer' was not declared in this scope
    This is sometimes related to old gcc (3.x) or an old version of Flex installed on the system.  If you get yy_current_buffer problems, see if you can upgrade gcc to 4.x or to a newer version of Flex.

 

 

 

Login to Message Boards

Separate username & password from team login.





Lost Password?
NOTE: Registration for message boards has been DISABLED because of SPAM. Please e-mail brian@rl-competition.org for an account.