Elon Musk is still warning us that super-intelligent AI is going to doom the planet, but robots are out here just trying to get their groove on. See the recent video above of quadruped research bot ANYmal, which was recently taught to dance (sort of) by researchers at Swiss university ETH Zurich.

As doctorate student Péter Fankhauser explains to The Verge, the interesting thing happening here is that ANYmal is reacting to the music it hears in real time, rather than relying on pre-programmed dance moves. This requires the robot to analyze the speed of the song, plan how it might move in time to the music, start dancing, and then check its own movements to see if they’re synced to the beat.

“We wanted to have it so if you bring the robot to a disco, it can figure out the music, create a choreography, and sync up its motion,” says Fankhauser. “We’re also interested in creating lifelike movements. Dancing is a very human and motion-intensive action, so it’s challenging to mimic.”

This a fun application of cutting-edge robotics, but it has serious research potential, too. The mechanism by which ANYmal analyzes its own movements to check that it’s dancing in time with the beat is a useful feedback loop. This sort of internal mechanism (Fankhauser compares it to a human imagining how they complete a task) could come in handy, controlling its actions for jobs like industrial surveying or search and rescue missions.

“We do a lot of serious things with the robot, but this is the fun side,” says Fankhauser. “For us, for students, for everybody involved, it’s enjoyable to do these things, and really explore the capabilities of the hardware.”