CS344M: Autonomous Multiagent Systems -- Fall 2010: 2D Programming Assignment 4
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:
-
UvA Trilearn 2003. UvA won the 2003 Robocup competition and is
known to have generally well-written and well-commented code.
Research done here at UT using the keepaway domain was built off of
the UvA Trilearn code. We recommend that you use this code base.
-
Brainstormers.
The Brainstormers won the 2005 Robocup competition, and have code that
features many different learned behaviors. It is less
well-tested and documented - but it may be stronger in some ways.
Both of these teams include all of the parsing, server interaction,
and individual skills (such as passing, dribbling, intercepting,
etc.). The high-level strategy that was used in the competitions is
missing from both teams, however. Instead, each team has a fairly
simple "placeholder" high-level strategy.
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. Specifically, you should change the home 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. Again, you
should change the decision from the defaults, and have the
agent make an appropriate decision.
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 (for example 11 of your assignment 2 agents). The other should be against itself.
Using UvA Trilearn
To begin using the UvA Trilearn code, follow these steps. First, copy
the code to your account:
% cp /projects/cs344M.pstone/trilearn_base_sources-3.3.tar.gz .
Uncompress the archive:
% tar zxvf trilearn_base_sources-3.3.tar.gz
Go into the resulting directory:
% cd trilearn_base_sources-3.3
Run configure to generate an appropriate Makefile:
% ./configure
Run make to compile the code:
% make
If everything worked, you should now have a player binary in the
"src/" directory called "trilearn_player". Go into the "src/" directory:
% cd src
You can run this player
like you ran your players from the previous assignments by starting
the soccer server in a separate shell and then typing in the current shell:
% trilearn_player
Alternatively, you can run the "start.sh" script from the trilearn_base_sources-3.3 directory
to start a whole team of trilearn_players:
% ./start.sh
Open up the "start.sh" script for details on usage. For example, you can specify the team name or agent numbers (note: you will likely always want to use localhost). Specifically, if you want to start a team named 'teamTwo', you could type the following in a new shell (assuming you're in the trilearn_base_sources-3.3 directory):
% ./start.sh localhost teamTwo
Now you can watch a real game! Of course, if you try to just run the "start.sh" script in two seperate shells, you will get errors since you are trying to start two teams with the same name. Also, don't forget that you need to start the soccer server before you run the "start.sh" script.
Help on UVA_trilearn
You should look at the following files (though you are encouraged to go through every file and understand the functionality, not necessarily every detail).
1. /src/WorldModel.cpp
2. /src/BasicPlayer.cpp
3. /src/Player.cpp
4. /src/PlayerTeams.cpp
The player API's are mostly in BasicPlayer.cpp and Player.cpp. You may start of by looking at the PlayerTeams.cpp and from there branch to other files. WorldModel.cpp would give you run time information about the world. We also recommend that you spend some time looking through the various documentation on the
UvA Trilearn 2003 website. You may also find the UvA Trilearn 2003 base code documentation and UvA Trilearn 2003 user manual helpful, especially if you use the 2D simulator for your final project.
Using Brainstormers
To begin using the Brainstormers code, follow these steps.
If you want to work on a personal machine, you probably want to get this copy of the code
% cp /projects/cs344M.pstone/BS05PubRel.tar.gz .
Likewise, you could get the code and documentation from Brainstormers Source Forge. Be prepared to spend some time getting things to compile and work, and be aware that you will likely need to use an older version of gcc/g++ (gcc-3.3.4 works on the department machines), compile with -fpermissive, and perhaps make a few other changes to the Makefiles.
If you want to set things up on the department machines, begin by
copying the code into your account:
% cp /projects/cs344M.pstone/BS05PubRelDeptMach.tar.gz .
Uncompress the archive:
% tar zxvf BS05PubRelDeptMach.tar.gz
Change to the main directory:
% cd Brainstormers05PublicRelease/bs2k/
Run make clean and make to compile the code:
% make clean
% make
If all goes well, you should now have a fresh Brainstormers player in the
"artagent/" directory named "BS2kAgent". You can run this player like
you ran your players from previous assignments by starting the soccer
server in another shell and then typing from the bs2k directory in the current shell:
% artagent/BS2kAgent
You can also start a whole team of Brainstormers by running the
"start_team.sh" script from the bs2k directory:
% ../scripts/start_team.sh
Remember to start the soccer server first!
Help on Brainstormers
You may find it helpful to type 'artagent/BS2kAgent -help' (from /Brainstormers05PublicRelease/bs2k).
Also be sure to browse through the Brainstormers Code Release Documentation. Note that when you run the agent, it warns that no neck turn is executed - don't worry about this for now.
Some Overall Details:
- Make sure that you get a new copy of .rcssserver-server.conf (or
undo the changes you made previously).
- 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!).
- Both single agents will not move until either cycle 200 after kickoff or if the
ball is dropped outside the center circle. This is normal.
- 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 one of the bases, so you know what you would like to
build on top of it for your final project.
- IMPORTANT: IF YOU HAVE ANY QUESTIONS EMAIL THEM TO THE
LIST! Everyone is going to have to get familiar with one of
these code bases in order to come up with an interesting project.
Remember, the point of this assignment is just to become familiar with
the code so that you are prepared for the final project.
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 two goals are
scored or your game reaches 1000 cycles (whichever comes first).
- 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 "katie" 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
Katie Genter
Questions? Send me
mail