Okay, so I was bored in math class. I came up with this idea for AI. What if you had 2 picaxes. One controlling sensors and locomotion, and one that had certain objectives (battery level stays above critical, don't let your gyro tilt too far, etc) for basic survival implanted in its code. Now what if, as the robot zooms around the yard, it flips. The gyro objective has been violated. the robot rights itself, and the second, objective picaxe starts comprising a new code to burn into the first one. It does so, and then the robot is off again, with a new code.