Monday, March 3, 2008

Project 3 Mike and Styler

Our project 3 compares still images. Give a picture and a name, it analyzes the picture and stores it's color distributions in an xml file. Given only a picture, it compares it against all stored people (xml files) it has saved. To compare, it creates color distributions for Red, Blue, and Green pixels (barring white pixels). Then, it compares the red distributions local minimums, maximums, the median and the mean. Comparing these distributions yields a difference, and the known person with the least difference is considered the match.

Here are our saved pictures:



Which were saved into XML. Then, we ran these pictures through the comparison:



The results were:
FaceDetection.exe styler2.jpg
Diff with styler from styler.xml is 103.669794574545
Diff with mike from mike.xml is 179.5194369055
Best match is: styler

FaceDetection.exe mike2.jpg
Diff with styler from styler.xml is 158.225831330128
Diff with mike from mike.xml is 82.0856684981685
Best match is: mike

The algorithm was a success. Given a photo stored into xml, the Diff would equal 0 every time. The algorithm also worked in the reverse direction. However, it is only suitable for fixed backgrounds between photos.

The code is in C# and available here. and a sample XML output is available here.

Project 3

For Project 3 we split into two teams, Mike and Styler vs. Wes and Lucas.

Monday, February 18, 2008

Project 2 Final Cut

Project 2 Credits

Optimash Prime:
Lead Caddy

Alex Styler:
Artificial Intelligence Engineer
Lead Programmer
Wardrobe
Director
Lead Camera

Lucas Coyne:
Team Chaplain
Assistant Caddy
Bugging Lead

Michael Edelson:
Interface Engineer
Debugging Lead

Wesley Chu:
Special Effects Artist
Talent Handler

Project 2 Results

Over 15 trials with no training, selecting complex motions at random:
Average putt distance: 1.66 feet
Percentage of successful swings: 33%

After 50 iterations of training, altering primitive probabilities and eliminating unsuccessful swings:
Average putt distance: 5.28 feet
Percentage of successful swings: 73%

After learning a dramatic increase in performance is observed. With more iterations, even better swings will become more probable and more unsuccessful swings will be eliminated, further increasing performance. The servo speed, however, limits the robot from ever being a successful player beyond short putts.

Project 2 Stills


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.