CS378: Autonomous Multiagent Systems -- Fall 2003: Programming Assignment 1


Programming Assignment 1 for Autonomous Multiagent Systems (cs378)


 

The following instructions are designed to work once you have logged onto a publinux machine. I recommend using a fairly fast machine. You can access a list of some fast computers by invoking the command "cshosts linuxtea".

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 9.3.7 for this class.

Get familiar with the soccer simulator

Make sure nobody else is running the simulator on the machine you're on:
	% ps -aux | grep soccer
	If someone is on, you will see a line with the word "soccerserver" in it.
	(For future reference, there IS a way to run multiple servers on 
	 the same machine.)

If you are not running the server on the local muchine, run the following command:
	% xhost a.cs.utexas.edu 
	    where 'a' is the name of the machine you are using.

In one shell, start the simulator: 
	% cd /projects/cs378.pstone/rcsoccersim-9.3.7/install/bin
        % ./rcsoccersim

In another shell, start a player: 
	% cd /projects/cs378.pstone/sampleclient        
        % ./client
        Type "(init myteam (version 9.3))" [instead of myteam, use your own name]and watch the new agent's sensory information stream by. 
        Kill the client (ctrl-C). 
 
Now start another player, but pipe the output to a file: 
        % ./client > ~/myteam.out    
        Type "(init myteam (version 9.3))" 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.  This will only happen once.  One way around 
	this problem is to wait until cycle 200 before starting to dash.
 
        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 clicking on "Quit." 
 
        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.
 
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. 

Watch a game

In a shell, go to the game logs directory 
        % cd /projects/cs378.pstone/logs
        % ls 
         
Pick at least one of the games to watch.  They are the finals from the previous 
5 RoboCup competitions. 
 
        % rcsslogplay   (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.)

Create a game log

 
Now repeat the sequence from "Get familiar with the soccer simulator."
 
After killing the server, notice the new logfile in your directory (the one which has your name)
	% ls *.rcg

replay your log: 
        % rcsslogplay ~/.rcg  
(where  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. 

[Back to Department Homepage]

Page maintained by Peter Stone
Questions? Send me mail