CS344M: Autonomous Multiagent Systems -- Fall 2010: 3D Programming Assignment 4


3D Programming Assignment 4 for Autonomous Multiagent Systems (cs344M)


 

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:

Both of these teams include all of the parsing, server interaction, and individual skills (such as walking, dribbling, kicking, 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 (6 players) of agents that can play a full game of soccer as follows:

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 6 of your assignment 2 agents). The other should be against itself.


Using UT Austin Villa

To begin using the UT Austin Villa code, follow these steps. First, copy the code to your account:
   % cp -r /projects/cs344M.pstone/3d/nao-agent
Run make to compile the code:
   % make
If everything worked, you should now have a player binary in the nao-agent/ directory called agentspark. You can run this player like you ran your players from the previous assignments by starting the soccer server and then typing:
   %./agentspark --host=localhost --team myteam --unum 2 --paramsfile paramfiles/defaultParams.txt&
 
Alternatively, you can run the "start.sh" script to start a whole team of UT Austin Villa players:
   % ./start.sh localhost
Remember to start the soccer server first!
   % rcsoccersim3d

Help on UT Austin Villa:

Hints : You may want to look at the following files (though you are encouraged to go through every file and understand the functionality, not necessarily every detail).
1. worldmodel.cc
2. naobehavior.cc
3. strategy.cc

The player API's are mostly in naobehavior.cc and strategy.cc. In worldmodel.cc you will find run time information about the world. Some really important methods for determing your position and positions of other objects in the world from measurement calculations by a particle filter are the following:
   worldModel->getMyPosition()  // returns a VecPosition (use getX() and getY() methods of VecPosition to get appropriate values) of the agent's global position on the field 
   worldModel->getMyAngDeg()    // returns the angle in degrees the
   agent is facing in the X-Y plane (the orientation of the agent)

   The getWorldObject() method return a WorldObject for a particular object in the world.
   WorldObjects contain useful information about the location of an object in the world.
   A couple if important members of WorldObject are "pos" which is a VecPosition of an objects location and 
   also "validPosition" which is a boolean flag stating wheter or not the value of "pos" is valid.

   worldModel->getWorldObject(WO_BALL)->pos; // position of the ball as a VecPosition
   worldModel->getWorldObject(WO_TEAMMATE1 /*WO_TEAMMATE#*/)->pos; // position of teammate as a VecPosition

You might also want to check out the following method for having the agent walk to a specific location
   goToTarget()

Using Little Green BATS


This code base and manual can be found here. To begin using the Little Green BATS code, follow these steps. Begin by downloading the code into your account from here. Uncompress the archive:
   % tar zxvf libbats-2.0.tar.gz

Download the Eigen C++ template library from here. Uncompress the archive:
   % tar zxvf eigen-2.0.15.tar.gz

If you're not on UTCS and have root access move the eigen directory to /usr/include and rename it to eigen2.
   % mv eigen /usr/include/eigen2 

On UTCS, in order to get the Eigen C++ template library in the include path of the compiler you'll need to set the CPLUS_INCLUDE_PATH environmental variable. First move the eigen directory to be inside your libbats-2.0 directory and rename it to eigen2.
   % mv eigen <path_to_libbats-2.0>/eigen2 
Then set the CPLUS_INCLUDE_PATH environmental variable to be your libbats-2.0 directory:
   % cd <path_to_libbats-2.0> 
If your shell is bash
   % export CPLUS_INCLUDE_PATH=. 
or if your shell is csh
   % setenv CPLUS_INCLUDE_PATH . 

Run configure to prepare the source code to be built.
If you are on a machine without root access (such as UTCS), then
   % cd <path_to_libbats-2.0>
   % ./configure --prefix=/somewhere/in/my/home/directory/libbats-install
otherwise
   % cd <path_to_libbats-2.0>
   % ./configure 

Run make to compile the code (this will probably take several minutes):
For some reason in order to compile we also need to create a symbolic link for the Eigen directory.
   % ln -s eigen2/Eigen Eigen
   % make
   % make install

If all goes well, you should now have a sample agent built. You can run this player like you ran your players from previous assignments by starting the soccer server and then typing:
   % cd examples/helloworld
   % ./helloworld


Some details:

What to turn in:


[Back to Department Homepage]

Page maintained by Patrick MacAlpine
Questions? Send me mail