A new system of algorithms enables four-legged robots to walk and run on challenging terrain while avoiding both static and moving obstacles. The work brings researchers a step closer to building robots that can perform search and rescue missions or collect information in places that are too dangerous or difficult for humans.