16-264 Humanoids

Assignment #2: Learning

this project by Sara Whitby and Brian Goldfain

General Assignment Specifications: The point of this assignment is to explore learning. You get to choose a task for the robot. Good ideas are having the robot throw something at a target on the floor, or play a golf-like game. We are cheating on perception: after a throw or a hit, you measure the location of the result, and provide that feedback to the robot. The robot changes what action it does on the basis of that feedback. The important part of the assignment algorithm is the algorithm of how feedback is used to change the robot action.

How we did it: We wrote a program that started with the robot going into a starting position with its waist turned all the way to the right and both arms raised, with the "golf club" in its right hand. Then it would wait for the sensor on the front of the left foot to be pressed before it would take a swing, which simply consisted of waist rotation, and push the ball foreward. The program then enters a while/break loop that waits for input from any one of its four foot sensors, which provide feedback as to what it should do to get the ball closer to the goal. The front left sensor being pressed at this time means the ball went too far left and it should shorten its swing by rotating it's waist less for a more rightward trajectory. The front right sensor indicates that the ball went to the right and the swing should be longer next time. The back left sensor means slow the motor down to decrease distance, and the back right sensor means it should speed up to make the ball go further. At first, the amount the swing length increases or decreases when the front sensors are pressed is fairly large, but as more swing adjustments are made, the amount of change made decreases. This means it assumes that the more corrections have been made, the closer the ball gets to the target and less adjustment is needed.

The robot in action! A video of our robot learning can be seen on YouTube. Enjoy!