Evolution is a trip. On the one hand, it’s a seemingly simple mechanism—those best fitted to their environment have more babies, while less fit individuals don’t reproduce as much, and their genes filter out of the system. But on the other hand (or paw or claw or talon), it has given rise to an astounding array of organisms. Some animals fly with feathered wings, others with membranes stretched between fingers. Some run on two legs, others four. Each has adapted to its environment in its own way.

Evolution is incredibly powerful, and it’s a kind of power that roboticists are now looking to for inspiration. New proof-of-concept research from scientists in Australia explores how evolutionary algorithms can design robot legs tailored to walk on specific surfaces. The results are at once logical, counterintuitive, and bizarre—and could hint at a novel way for roboticists to engineer walking machines.

The researchers begin with 20 randomized digital leg shapes constrained down to a particular size (so you don’t get 10-foot-long nightmare legs). Each design is based on elements called Bezier curves. “A Bezier curve is if you're in Microsoft Paint and you define a curve by clicking on a couple of control points, but it's in three dimensions,” says research scientist David Howard of Australia’s Commonwealth Scientific and Industrial Research Organisation. The system projects these curves into a grid of 3-D pixels, known as voxels. “All we say is, anywhere where the curve intersects with a voxel, we're going to put some material in that voxel,” Howard adds. “Everything else is blank.” This gives each design its unique shape.

LEARN MORE The WIRED Guide to Robots

The simulation looks at the “fitness” of a given leg if it were walking on one of three surfaces: hard soil, gravel, or through water. Only instead of selecting for traits like good eyesight or camouflage, like natural selection would in nature, the system selects for how much torque a motor would have to exert if it had to power a leg shaped a particular way to walk across one of the surfaces. In other words, an energy efficient leg is a good leg. Bonus points for leg shapes that require less material.

“If we have a gravel surface and we walk the leg through it, we calculate the forces on the individual pieces of gravel,” says Howard. “It gives us a really high-fidelity look at what the leg is actually doing in the environment.” Same with water and the hard soil.

The researchers then take those original 20 legs and combine the best performing ones. That is, selecting the most fit, which “reproduce” to create child legs that look a bit like them. “We just do that again and again and again,” says Howard. One hundred generations total. They ended up removing the lowest performing half of the population, like a nasty environment might cull a population of animals in nature. “And then what happens is we get this automatic adaptation to the environment.”

Collins, Geles, Howard & Maire

Take a look at the image above. At top are the legs that the evolutionary algorithm determined would most efficiently walk across hard soil. The middle row is for gravel, and the bottom for water.

The blade-like legs make good sense walking across soil: Because the surface is hard, the slimmed-down limbs won’t sink through the terrain. “That's why gravel is a bit thicker, because it needs to have these wider footprints,” says Howard. That’d help the legs walk on top of gravel instead of sinking through it. Like snowshoes.

The fat legs adapted for water? They’re a bit of a mystery. “The water was a weird one, because we were expecting the same sort of blade-like structures as the soil,” says Howard. That’d let them cut through the water. Plus, you’d expect the system to prefer slimmer designs, given its directives. “But it didn't. We're still not 100 percent sure why that is.”