If you would like to work remotely and have a slow connection, you should look into installing the RoboCup Soccer Server System on your local machine. We will be using version 11 for this class. There are tarred, gzipped versions of the server components at /projects/cs344M.pstone/rcss_11/ . You can also get them from http://sourceforge.net/project/showfiles.php?group_id=24184 . Note that if you'd like to install the server on your laptop or home machine, there are instructions at the top of http://www.cs.utexas.edu/~mtaylor/instructions.htm .
/projects/cs344M.pstone/rcss_11/bin/To do this, first determine which shell you are using by typing
% echo $SHELL
at the command prompt. If you are using bash, open the file in your
home directory named ".bashrc" and add these line to the end of it:
export RCSSBASE=/projects/cs344M.pstone/rcss_11 export BOOST_ROOT=/projects/cs344M.pstone/boost_1_34_1 export PATH=$PATH:$RCSSBASE/bin/ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BOOST_ROOT/lib:$RCSSBASE/libor (if you don't already have a LD_LIBRARY_PATH set):
export LD_LIBRARY_PATH=$BOOST_ROOT/lib:$RCSSBASE/libIf you are using csh or tcsh, open the file in your home directory named ".login" and add this line to the end of it:
setenv BOOST_ROOT /projects/cs344M.pstone/boost_1_34_1
setenv RCSSBASE /projects/cs344M.pstone/rcss_11
setenv PATH ${PATH}:${RCSSBASE}/bin
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${BOOST_ROOT}/lib:${RCSSBASE}/lib
or (if you don't already have a LD_LIBRARY_PATH set):
setenv LD_LIBRARY_PATH ${BOOST_ROOT}/lib:${RCSSBASE}/lib
Note: You will need to restart your shell (or just
log out and log back in again) for these changes to take effect!
For more information on setting your shell's environment variables, see
this shell intro page.
% ps aux | grep rcssIf someone is on, you will see a line with the word "rcssserver" in it. (For future reference, there IS a way to run multiple servers on the same machine.)
% xhost a.cs.utexas.edu where 'a' is the name of the machine you are using.
% rcsoccersim
If the command rcsoccersim cannot be found, make sure that your PATH
environment variable is set correctly (see the instructions above).
% cd /projects/cs344M.pstone/sampleclient
% ./client
Type "(init myteam (version 11))"
[instead of myteam, use your own name] and watch the new agent's sensory information stream by.
Kill the client (ctrl-C).
% ./client > ~/myteam.out
Type "(init myteam (version 11))" and see a 2nd agent appear on the field.
Type "(move -10 0)" and see the player move onto the field.
Press the "kickoff" button on the simulator window.
Type "(turn 45)" and see the player turn.
Type "(turn -45)" and see the player turn back.
Type "(dash 100)" and see the player move.
Type "(dash 100)" several more times until the player is next to the ball.
Type "(kick 100 0)" and see the ball move towards the goal.
NOTE: If you don't get the player to the ball by cycle 200, it may jump
back to where it started. If you can't enter the dashes
quickly enough, you could try again, modifying the "(move -10
0)" command above to something like "(move -3 0)" so that the
player starts closer to the ball.
Notice that all this time, the clock at the top of the simulator has been.
running. When you kicked off, the play mode changed to "play_on".
Now middle-click with your mouse somewhere on the field and give.
a free kick to one of the teams. Notice that the play mode changes.
Kill the client (ctrl-C).
Kill the simulator by hitting ctrl-C in the window that you
started the server from.
Now inspect the file ~/myteam.out to see the player's sensations
during the above sequence.
-- Search for "ball" (it should have become visible after the "move").
-- Search for "referee" (changes to the play mode are announced).
The flags are all static markers that help the player figure out where
it is on the field.
NOTE that if you just close the soccer server window, you probably will just stop the monitor. The actual soccer server process ("rcssserver") will probably still be running, unless you stopped everything by hitting ctrl-c in the terminal window it started in. This can be annoying; if you want to kill the soccer server you'll probably have to find the process (ps aux | grep "rcss") and kill it manually.
In this exercise, you controlled the player by typing. Your sensations came from an overhead view of the field. Your task during this class will be to program agents to control players. Their sensations will be exactly what you saw in the file myteam.out.
% cd /projects/cs344M.pstone/logs
% ls
Pick at least two of the games to watch, one recent and one older (to
notice the difference in play). They are the finals from 8 previous
RoboCup competitions.
% rcsslogplay <game> (e.g. "rcsslogplay 99final.rcg")
(A full game lasts to cycle 6000. The 98 final is divided into 2
halves. The 2001 final goes into extra time.)
If the log player doesn't work, see the instructions above to make
sure that nobody is running the soccer server on your computer.
% ls *.rcgreplay your log:
% rcsslogplay <file>.rcg
(where <file> is the name of the log displayed by the previous command)
Turn in the logfile as directed on the main assignments page.
During this course, you will often be sending us such logfiles as the
results of your programming assignments.
Page maintained by
Peter Stone
Questions? Send me
mail