A more refined version of the robots could temporarily repair bridges or buildings during emergencies, or assemble into different types of furniture or heavy equipment as needed, researchers believe.
Developed by scientists from the Massachusetts Institute of Technology (MIT), the robots, known as M-Blocks, are cubes with no external moving parts.
They are able to climb over and around one another, leap through the air, roll across the ground, and even move while suspended upside down from metallic surfaces, researchers said.
On each edge of an M-Block, and on every face, are cleverly arranged permanent magnets that allow any two cubes to attach to each other.
More From This Section
"It's one of these things that the [modular-robotics] community has been trying to do for a long time," said Daniela Rus, a professor of electrical engineering and computer science and director of MIT's Computer Science and Artificial Intelligence Laboratory (CSAIL).
"We just needed a creative insight and somebody who was passionate enough to keep coming at it - despite being discouraged," Rus said.
MIT researchers are now building an army of 100 cubes, each of which can move in any direction, and designing algorithms to guide them.
"We want hundreds of cubes, scattered randomly across the floor, to be able to identify each other, coalesce, and autonomously transform into a chair, or a ladder, or a desk, on demand," said John Romanishin, a research scientist in CSAIL, who first proposed the new design for modular robots.