CS378: Autonomous Multiagent Systems -- Fall 2002: Programming Assignment 4


Programming Assignment 4 for Autonomous Multiagent Systems (cs378)


 

This assignments is designed to get you familiar with the code base that you will be using for your final project. The code is based on the United-2002 RoboCup entry (source code available there). It includes all of the parsing, server interaction, and individual skills (such as passing, dribbling, intercepting, etc.), but none of the high-level strategic information. Your goal is to create a team of agents that can play a full game of soccer as follows:
  • Each player should be given a "home position" where it returns when the ball is not near. You choose the home positions.
  • When the player thinks that no teammate could get to the ball more quickly, it should try to get to the ball.
  • Once it has the ball, it should choose to dribble, pass, or shoot (kick). In all cases you will need to specify a direction.
  • When your team is ready, have it play 2 games and turn in the logfiles. One game should be against a team of agents that all go to the ball. The other should be against itself.

    Some details:

  • Make sure that you get a new copy of .rcssserver-server.conf (or undo the changes you made previously).
  • The code base can be copied from /projects/cs378.pstone/united.tar.gz
  • To get things running:
  • Do "tar -xzf united.tar.gz; cd united/player; make depend; make". The code should compile as the executable "client."
  • In another shell, start the server.
  • From the original shell, type "./start."
  • You should now see a player on the monitor. If you start the game with a dropball, it should go to the ball and score.
  • To get a full team of players that do the same thing, edit the "start" script by commenting back the 20 lines at the bottom. When you start the game, they should flock to the ball. This is the team you should play against in one of your logfiles.
  • Hints:

  • There is a README file in united/player/README. That tells you how to access the world model and use the simple behaviors that exist. Behaviors for assignment 2 (shooting and passing) are included.
  • You can create your team with a single executable by having the player's uniform number determine its home position.
  • Don't worry about making a goalie with special behavior (unless you want to!).
  • There is A LOT of functionality in this code. You don't need it all. But the point of this assignment is to try to become familiar with the base, so you know what you would like to build on top of it for your final project.
  • Notice in MemPosition.h that there are routines for converting a position to a position that is not offsides (useful for starting the game when your team has to be on its own side of the field).
  • Also in MemPosition.h you can find all of the access functions for positions of players, the ball, etc.
  • Notice the "FastestTeammateToBall" prototype in MemAction.h.
  • There are variables Mem->MyTeam and Mem->TheirTeam that indicate which side of the field the player is playing on.
  • The vector class and all of its funcitons (such as distance between two points) are in shared/geometry.h.
  • IMPORTANT: IF YOU HAVE ANY QUESTIONS EMAIL THEM TO THE LIST! I know this code quite well and will be happy to help you understand it or find things. I've tried to give you all the relevant hints. But it's quite possible that I missed something. I can't help if you don't ask. Remember, the point of this assignment is just to become familiar with the code so that you are prepared for the final project.
  • The code prints out some error messages on occasion. If things are working, you can generally ignore them. If things aren't working, they may help me diagnose the problem.
  • What to turn in:

  • 2 logfiles of games as described above. The one against the team of players that all go to the ball should be called [yourlogin]-vs-herd.rcg. The one against itself should be called [yourlogin]-vs-self.rcg. In both cases, run the game until a goal is scored or for at least 1000 cycles.
  • Your tarred, gzipped source code, [yourlogin]-source.tar.gz. You only need include files you've modified.
  • To turn in your files, use the turnin program with grader "vinay" and assignment label "prog4". When the assignment is there, send us an email to that effect with a brief description of what your team does.

  • [Back to Department Homepage]

    Page maintained by Peter Stone
    Questions? Send me mail