Robot able to relearn automatically to walk after suffering damage. To continue to walk, it runs a new learning algorithm called “Intelligent Trial and Error” that performs experiments to quickly adopt a compensation behavior. It is based on a previous experience to create a detailed six-dimensional “map” of thousands of different ways to accomplish its task. If the tested behavior does not work, the robot chooses a different type of behavior in another area of the map. It is able to take a new approach after only one minute of testing.