Monday, February 18, 2008

Project 2 Source Code

The source code for project 2 is available here. It starts with 3 or 4 primitive motions for each servo and creates random complex motions to execute. After execution it waits for feedback through the IR and a menu that we created. Possible feedback is No swing (wii remote didn't recognize the motion), distance ball traveled 1-20, or Switch Modes. During learning mode, the robot takes the feedback we give it, and weights the motions for each servo based on the level of success. Thus a motion that is involved in a good swing is much more likely to happen. During learning mode, doing the same swing multiple times is discouraged (50% chance to repick a swing the 2nd time, 30% the 3rd, etc) in order to encourage innovation. Swings that entirely fail, on the other hand, will not be selected again at all. Switching back to regular mode, the robot keeps the weighted probabilities from past learning, but will select good swings as many times as it wants.

For questions email us.

No comments: