When you picture futuristic robots, you probably imagine a machine that behaves like Optimus Prime — nimbly transforming itself into different shapes and combinations at will.

That remains a distant fantasy, but researchers at MIT say a new model for adaptive machines is beginning to emerge, one founded upon transforming from the outside (instead of the inside) using different exoskeletons. In the future, researchers say, similar models may make it possible for microrobots to perform surgeries from inside the human body or make space exploration more feasible.

The robot is known as “Primer,” a centimeter-long, cubed-shaped machine developed by researchers from MIT’s Computer Science and Artificial Intelligence Lab (CSAIL) that uses magnets to walk, roll, sail and glide with the help of different origami-like exoskeletons. Made of foldable plastic, the exoskeletons can be manipulated using a heat pad and then dissolved once the robot is immersed in water, researchers said.

Daniela Rus, CSAIL director and principal investigator of the project, calls the transformation — which has been documented on film (below) — a “costume change” and says Primer was inspired by one of nature’s most iconic reconfigurations: butterfly metamorphosis.

“Each costume change gives the robot a new power,” she said. “It’s really a new way of thinking about how you would get one robot to perform different tasks instead of making a really complex robot — or numerous complex robots — for multiple tasks.”

Each iteration of Primer has a different advantage, researchers said. The “Wheel-bot,” for example, has wheels that allow the machine to move twice as fast as “Walk-bot.” The “Boat-bot,” meanwhile, can float on water and carry nearly twice its weight, and the “Glider-bot” can quickly travel across “long” distances.

Eric Diller, a microrobotics expert and assistant professor of mechanical engineering at the University of Toronto, said that form-changing robots have been created at larger sizes, but they’ve been limited to two shapes — “open” and “closed.”

Because Primer’s exoskeleton can be folded into new shapes in a few seconds, Diller said he envisions a scenario involving rapid fabrication of robots.

“I could envision devices like these being used in ‘micro-factories’ where prefabricated parts and tools would enable a single microrobot to do many complex tasks on demand,” he said.

“Imagine future applications for space exploration, where you could send a single robot with a stack of exoskeletons to Mars,” says postdoc Shuguang Li, one of the co-authors of the study. “The robot could then perform different tasks by wearing different ‘outfits.’ ”

For years now, futurists have dreamed about tiny robots someday being unleashed inside the human body to perform surgeries without cuts or infections. Rus said she can imagine her model being used accordingly: a patient swallowing one pill that contains a robot and other pills that contain various exoskeletons and tools for surgery.

Researchers said similar robots could also be used in space exploration by sending a single robot with multiple exoskeletons to Mars, where it could adapt using its wardrobe of “outfits.”

“Imagine making these machines at the larger scale and sending them to a disaster site,” Rus said. “Using different exoskeletons, the machine could first map the space and then dig or remove debris to clean up the site, depending on the needs of the operation.”

Rus said her team wants to expand the robot’s capabilities and plans to create more exoskeletons that give Primer the ability to drive through water, burrowing in sand and camouflaging itself.

“This is futuristic stuff,” she said, “but the ideas we are introducing are beginning to be realized in the real world, and that’s really cool.”