If it wasn’t for its lack of a head, a robot from a University of Oslo research group would seem alarmingly life-like as it stumbles across the floor. Named DyRET, this quadruped teaches itself how to walk on different terrains, and even learns from its mistakes.

DyRET has gone through a few different designs since it first hit the pavement in 2015. But the latest version, as reported on by WIRED, is the most adept at figuring out the leg and gait length necessary to cruise around on ice, rocks, or any other surface. With every shaky step DyRET makes, we’re that much closer to having truly all-terrain robots.

Of course, DyRET doesn’t always look like it’s got things figured out. When its designers set it on a new surface, the robot starts shifting everywhere. All four legs, which have joints that bend inwards, expand and contract in two places. DyRET tries out various-sized steps, too, and sometimes, the choices fail and it falls over. But DyRET’s motion sensor picks up on which choices provide the most stability, and the robot remembers the successful ones.

Once it has a terrain mastered, DyRET can also do something most toddlers don’t have figured out: Stop running around wildly when running low on energy. Moving long legs takes a lot of power. Long, swift strides is DyRET’s ideal state, but as the battery drains, it will shorten its legs to stop wasting so much energy on swinging a limb. Instead, the robot will try and compensate by moving shorter limbs faster.

DyRET’s constant evaluation of its space puts it in a tech category called “evolutionary robotics.” In nature, evolution happens over many generations of one species. Individuals don’t evolve, but the members with the best traits for surviving in a habitat pass those more-competent qualities onto their offspring. In evolutionary robotics, that (sometimes) decades-long process of assembling the most useful characteristics is condensed into just the one robot. Though built with all kinds of capabilities, the robot learns to rely on the ones that work best for the conditions it’s in.

DyRET at the University of Oslo Department of Informatics Image: Tønnes Nygaard