Algorithm Design Document

    By Chris Bolduc, Jeremy Redgrift, and Zaid Ali


After some contemplation, both as a group and individually, we decided on one implementation.  The first implementation we had considered was a sort of “back-and-forth” implementation.  The robot would start in the center of the circle and move forward until it found the boundary of the circle, then it would back up to its starting point (the center), angle itself a little to the right, and repeat the process.  We quickly discovered that this wouldn’t work due to there being no reliable way to determine the position of the center, or starting point, of the circle once the robot started moving.  After more contemplation, we decided to use the robot’s photo-sensors to, in-effect, bounce off the boundaries randomly pushing cans out of the circle along the way.  The exact way this would work is as follows: the robot would move forward until a boundary is found, rotate approximately 130 degrees and continue moving forward until another boundary is found.

Runtime Analysis and Algorithm Description

The “bouncing” implementation we chose to use was not a terribly complex one.  This enabled it to be both easy and quick to implement and understand as well as being flexible to change.  The name “bouncing” that we gave to the robot’s implementation came from the description of its behavior.  The robot would essentially bounce off each boundary like the ball in “pong” would bounce off the paddle.  The program flow is divided up into three main phases or methods as are as follows: