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

Programming Assignment 4 for Autonomous Multiagent Systems (cs378)


This assignment is designed to get you familiar with the code base that you will be using for your final project. For this, you will have two choices:
  • Code based on the United-2002 RoboCup entry (source code available there).
  • Code based on the UvA Trilearn 2003 RoboCup entry (source code available there).
  • Each of these have pros and cons. The United code was written by the course instructor. As such, he can provide some technical support. In particular, there are some hints below on this page that apply only to that code (indicated "(United)"). On the other hand, the UvA Trilearn code, while based in part on the same code as United, is much more up-to-date, and served as the basis for the RoboCup 2003 champion team. My recommendation is that you use the UvA code. Teams that do so will likely have an advantage performance-wise. If anyone wants to do an empirical comparison, try giving both teams the same formations and behaviors and play them against each other. If you do that, please let me (Peter) know the result! In both cases, the code 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. If you are using the Trilearn code, you should change the positions from the defaults.
  • 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. If you are using the Trilearn code, you should change the decision from the defaults.
  • 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).
  • (United) The United code base can be copied from /projects/cs378.pstone/united.tar.gz
  • (United) To get that code 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:

  • (United) 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 these code bases. 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.
  • (United) 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).
  • (United) Also in MemPosition.h you can find all of the access functions for positions of players, the ball, etc.
  • (United) Notice the "FastestTeammateToBall" prototype in MemAction.h.
  • (United) There are variables Mem->MyTeam and Mem->TheirTeam that indicate which side of the field the player is playing on.
  • (United) 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.
  • (United) 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 "mazda" 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