A group of scientists now better understand how snakes are able to climb steep sand dunes thanks to a new study that involved designing a robotic sidewinder.

According to BBC News, authors of a study published in the journal Science learned that rattlesnakes flatten themselves to increase their overall contact with the steep slope. Complicating the matter is that sand's grainy texture makes sliding up a slope a bit more complicated to understand.

They found that only these "sidewinding rattlesnakes," known as Crotalus cerastes, flattened themselves to gain better traction on sand dunes. The test subject snakes were able to handle every slope they saw.

"We originally hypothesised that the way the snakes could ascend would be to dig their bodies more deeply into the sand, just like we would do on a sandy slope," study senior author Dr. Daniel Goldman, an associate professor of physics at the Georgia Institute of Technology, told BBC News. "One of the first surprises was how nice these animals are as subjects - they tend to just sidewind on command."

When the researchers used a robotic snake, designed at Carnegie Mellon University, to test this kind of movement, it was not quite as successful, the Washington Post reported. However, when the researchers programmed the robot to imitate the rattlesnakes' wave-like body motion, the robot was able to make its way up the dunes.

"Our initial idea was to use the robot as a physical model to learn what the snakes experienced," Goldman said in a press release. "By studying the animal and the physical model simultaneously, we learned important general principles that allowed us to not only understand the animal, but also to improve the robot.

"The idea of moving on flowing materials like sand can be useful in a broad sense. This is one of the nicest examples of collaboration between biology and robotics."