Assignment 5: Behavior ("closing the loop")

The goal of this assignment is to familiarize you with the process of creating high-level behaviors for the robots, starting from the lower-level skills we have built up in previous assignments. This process is often referred to as "closing the loop." You will also learn about our team's framework for keeping track of the robot's current behaviors and the transitions between behaviors. We usually refer to this framework as the "task hierarchy"; it is similar to a finite state machine (FSM) in certain ways, but more extensible and better suited to the types of behaviors we need for robot soccer.

The assignment is divided into two parts. In Part I, you will create a behavior for a single robot that finds the ball and kicks it toward the goal. In Part II, you will build on this to create a behavior for two robots working together to score on the goal. You must work in groups of at least two on this assignment.

Part I - Closing the loop for one robot

Your task in this part is to create a behavior for one robot that can kick the ball into the goal. At a bare minimum, your behavior should be able to score a goal when the ball is placed 1-2 feet from the goal and centered in front of it, and the robot is placed anywhere on the same half of the field. If you want to take the assignment further, try to make your robot able to score from more locations on the field. Some are quite tricky!

Take the following steps to get started.


Part II - Coordinating two robots

Your task in this part is to write behaviors for two robots that work together to score a goal. One way you can accomplish this is by writing a "do-nothing" behavior that you load up on one robot, and then loading up your behavior from Part I on the other robot -- but we hope you'll be a little more creative than that. (We will at least test that each robot can take control when the ball is right next to it). Ideally, two robots should be better at accomplishing this task than one, but it will take a little thought to make that happen -- note that if you just load up the single-robot behavior on two robots, they'll bunch around the ball like little kids playing soccer and just get in each other's way (try it).

The robots are already set up to communicate a lot of information that you may find useful. For example, a robot can find out if any of its teammates see the ball by looking at the teammateState[i]->seesball WorldState variable for each of its teammates (i∈[0,NUM_TEAM_MEMBERS), i≠M_ID). They are also set up to communicate variables called goToBall and strategyGoToBall, which are shortcuts to our team's (rather complicated) strategy for coordination. DO NOT USE THESE TWO VARIABLES IN YOUR SOLUTION! That would be cheating unless you had a deep understanding of what goes on in to drive these variables -- and trust us, gaining that understanding is way more work than just using the other available WorldState info to write your own solution. (=



You will demo your behaviors on the due date (Oct 25) in class. Please be ready with executables for your single-robot and your 2-robot solutions (so probably 3 separate memory sticks). You will also turn in your source code (any files you have changed -- most likely only CompositeTasks.h) and an email description of what you have done.

Authors: Peggy Fidelman and Dan Stronger
Feel free to contact Peggy (peggy@cs) with any questions about this assignment.

[ Back to Class Home page ]

Page maintained by Peter Stone and Dan Stronger
Questions? Send me mail