# MathCS - Robotics

### Challenge: Treasure Hunt

In this challenge your robot needs to locate a "treasure", head towards it, and stop when it reaches it. The treasure is a box-like object similar in dimension to a 1/2 gallon juice box (see the sample movies).

You first position your robot any way you like in an unobstructed area. After that the treasure is placed somewhere within 1 meter of your robot. There will be one other obstacle - fool's gold - located roughly opposite the treasure, but further away from the robot than the treasure. You can then turn on your robot but you may not manually move it nor change its heading. No other obstacles will be closer to your robot, and the path to the treasure is not blocked. Your robot needs to distinguish the real treasure from the fool's gold and move autonomously toward the treasure. Your robot needs to stop close to the treasure but without touching it.

#### Scoring

You must be successful in at least 1 of 2 trials and you have 10 minutes to prepare after learning the course layout. You receive 70 points if your robot heads in the generally right direction. If your robot stops within 25 cm of the goal you receive an additional 10 points, 20 extra points if it is within 20 cm, or 30 extra points if it stops within 15 cm or less. 5 points are subtracted if you touch the treasure.

### Results from 10/22/2008:

We had switched our programming environment to Java, which provided more flexibility but required more diligence. People who were already familiar with programming handled the transition without too any problems but people without prior experience struggled somewhat.

We used two bottles as "treasure" and "fool's gold" and placed the robot in a line between them, closer to one (the treasure), and with arbitrary heading. All teams who had an entry ready to go managed to succeed, but two teams did not "competed" - they will have an off-camera chance to solve this challenge. One of the teams put in code to hear the distance reported by the ultrasonic sensor as the robot is scanning: closer distances meant higher-pitched notes. A nice feature!

 Score Team A: 100 Team B: 100 Team C: 100 Team D: 0 Team E: 0

#### Instructor's Sample Movies

The sample movies do not include the "fool's gold" ...