Four-legged robots can pull off a lot of complex tasks, but there’s a reason you don’t often see them navigating “busy” environments like forests or vine-laden overgrowth. Despite all their abilities, most on-board AI systems remain pretty bad at responding to all those physical variables in real-time. It might feel like second nature to us, but it only takes the slightest misstep in such situations to send a quadrupedal robot tumbling.

After subjecting their own dog bot to a barrage of obstacle course runs, however, a team at Carnegie Mellon University’s College of Engineering is now offering a solid step forward, so to speak, for robots deployed in the wild. According to researchers, teaching a quadrupedal robot to reactively retract its legs while walking provides the best gait for both navigating and untangling out of obstacles in its way.

[Related: How researchers trained a budget robot dog to do tricks.]

“Real-world obstacles might be stiff like a rock or soft like a vine, and we want robots to have strategies that prevent tripping on either,” Justin Yim, a University of Illinois Urbana-Champaign engineering professor and project collaborator, said in CMU’s recent highlight.

The engineers compared multiple stride strategies on a quadrupedal robot while it tried to walk across a short distance interrupted by multiple, low-hanging ropes. The robot quickly entangled itself while high-stepping, or walking with its knees angled forward, but retracting its limbs immediately after detecting an obstacle allowed it to smoothly cross the stretch of floor.

“When you take robots outdoors, the entire problem of interacting with the environment becomes exponentially more difficult because you have to be more deliberate in everything that you do,” David Ologan, a mechanical engineering master’s student, told CMU. “Your system has to be robust enough to handle any unforeseen circumstances or obstructions that you might encounter. It’s interesting to tackle that problem that hasn’t necessarily been solved yet.”

[Related: This robot dog learned a new trick—balancing like a cat.]

Although wheeled robots may still prove more suited for urban environments, where the ground is generally flatter and infrastructures such as ramps are more common, walking bots could hypothetically prove much more useful in outdoor settings. Researchers believe integrating their reactive retraction response into existing AI navigation systems could help robots during outdoor search-and-rescue missions. The newly designed daintiness might also help quadrupedal robots conduct environmental surveying without damaging their surroundings.

“The potential for legged robots in outdoor, vegetation-based environments is interesting to see,” said Ologan. “If you live in a city, a wheeled platform is probably a better option… There is a trade-off between being able to do more complex actions and being efficient with your movements.”