s t r a t e g y

Our strategy was 'do or die' to the extreme. Not only were we going for the lava pit, but the specific design of our robot gave us exactly 1 shot to pick up a ball. If we failed to pick up the ball with the release of our 'jaws', that was it. It was over.

First of all, we were shooting for a minimal robot in terms of structure because we wanted to be very fast. Due to the fact that we had a huge gaping hole straight through the middle of our body, we could set 'front' as one of the sides, and therefore eliminate the need to turn to go towards the balls. After figuring out the side it was starting on, the robot simply had to start running backwards or forwards.

To find our way around the board, we were initially going to go with wall-following. However, the fact that one side of wheels was really a set of gears acting as wheels, we found that the robot had a tendency to veer towards the wall anyway (since the gear wheels were slightly smaller than the normal ones). So we dumped the whole wall-following portion of our code, and just told the robot to move forward (to mo's horror, as she watched her long, laborious hours of coding go down the drain (her code actually compiled (not saying very much), believe or not)) - the wall-following was inherent in the hardware of our robot.

The thin, one-lego-thick wall that was always against the wall of the gameboard was 1" thin, barely enough to fit between the wall and the set of balls closest to it. So by just moving up the wall, the robot would find itself over some balls along the way. Checking the color with phototransistor sensors, the robot could decide whether it wanted it or not, and then release the trap if the ball was desirable.

To go back, the robot simply had to be told to move backwards. Still tending to veer towards the wall, it would follow it down, turning whenever appropriate until it got to the lava pit. The width of the robot was precisely such that if one side was touching the wall, the other side would bump into the lava pit. Once the robot was there, it would move over the pit until the pit was in the middle of the body. Then the contraption holding the ball would be dropped, allowed to hit the lava pit, and release the ball.