CS344M: Autonomous Multiagent Systems -- Fall 2012: 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.

This team 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, however. Instead, the team has a fairly simple "placeholder" high-level strategy of just standing in place.

Your goal is to create a team (11 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 11 of your assignment 2 agents). The other should be against itself.


Running the server on a remote machine (for better game performace)

When running a full team, and especially when running a game of two teams against each other, it is recommended that you run the server on a remote machine so that the server, RoboViz, and teams aren't all competing for a single machine's resources. In order to do this first choose a machine to run the server on from the list of available machines:
        % cshosts pub64
In one shell, start the server on the remote machine:
        % ssh <remote_machine_name>
	% run_server3d  (be sure to check first that there isn't
	already a simulator running on the remote machine following
	the instructions in step 2 of assignment 1, and if so choose a
	different machine to run the server on)
In another shell, start the roboviz monitor on the local machine:
        % export RCSS_HOST=<remote_machine_name>
	% run_roboviz
You will likely see a lot of text including error messages being printed out as the server and monitor start up but don't worry as you can ignore these.

You might also want to run teams on remote machines as well to further spread out the use of computational resources (at competitions the server, RoboViz, and each team are all run on separate machines).

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/utaustinvilla
Run make to compile the code:
   % make
If everything worked, you should now have a player binary in the utaustinvilla/ 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&
        [instead of myteam, use your own name]
	[if you're running the server on a remote machine use the name of that machine for the host instead of localhost]
Alternatively, you can run the "start.sh" script to start a whole team of UT Austin Villa players:
   % ./start.sh localhost
        [if you're running the server on a remote machine use the name of that machine for the host instead of localhost]
Remember to start the soccer server first!
Locally using
   % rcroboviz
or remotely using
   % run_server3d

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 given below. It is no longer necessary to parse the vision input to get the position of objects on the field (and in fact you shouldn't do this as the agent will be spinning its head requiring an extra computation to make positions relative to the agent's torso).
   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 returns a WorldObject for a particular object in the world.
   WorldObjects contain useful information about the location of an object in the world.
   A couple of 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

The methods canKick() and stopKickBall() have been removed as they were only needed for purely reactive agents. The kickBall() method has been changed to kickBall(int kickTypeToUse, VecPosition target).

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

Other code bases

There are other code bases out there including one from magmaOffenburg written in java and available here, and TinMan written for the .NET Framework. Third party code bases are not directly supported by the instructor/TAs for the course and will be up to you to get them running and working if you choose to use them.

Some details:

What to turn in:


[Back to Department Homepage]

Page maintained by Patrick MacAlpine
Questions? Send me mail