What do you do if you’re a robotic hexapod and one of your legs is broken? Do you give up? Lie down and burst into flames? Cry from tear duct-less eyes? Or, through a process of trial-and-error, do you brush yourself off, hide your broken leg, and learn to walk again?

You guessed it.

Researchers Antoine Cully, Jeff Clune and Jean-Baptiste Mouret have trained a hexapod to try different walking configurations through “Intelligent Trial and Error.” The original version of this algorithm kept the robots stumped for about 20 minutes until they figured out how to go in a relatively straight line after suffering damage. The new system lets the robots learn to walk in about two minutes.

As you see in the video, the robot tries different walking “styles.” First it hops a little, then it brings its damaged leg up high to try to balance itself. All the while it is sensing its position in the room as well as its speed. If the gait it has chosen is suitably straight and fast, it can keep doing it indefinitely until it gets moving again.

How does it work? Well, in this case the researchers created a database of potential gaits – 13,000 in all – by running a simulated version of the hexapod and rendering the walking styles. Because the robot is fairly simple it could easily classify the problem it was having (broken strut, mashed leg, etc.) and compare it to the database. Then, using a series of tests, it could decide how to move.

While this isn’t exactly artificial intelligence, the system does save time in the field and, more importantly, allows the robot to carry out its nefarious mission without stopping, an important consideration when the robots finally rise up to take control of our precious bodily fluids.

For more on what Hexapod Robots are doing to stay indestructible, check out Spectrum and remember to watch the video above again.

The original copyright to this post belongs to Techcruch. All rights reserved. Image & Video are the properties of Spectrum.