Self-sculpting sand robots are under development at MIT
Tiny robots that can join together to form functional tools and then split apart again after use might be ready for market in little more than a decade, according to researchers.
A team at the Massachusetts Institute of Technology says it has developed about 30 prototype "smart pebbles" and the software to run them.
The sides of each cube are 1cm (0.4 inches) in length.
Efforts are now focused on creating smaller models.
The researchers from the university's Distributed Robotics Laboratory liken the ultimate product they are trying to develop to"self-sculpting sand".
"We want to have a bag of this material that can form any shape you demand," PhD student Kyle Gilpin told the BBC.
"So if you are in an isolated situation and you need a certain tool, you can tell that to the bag by making a miniaturised model of the tool, drop it into the bag, shake it around - and what you would end up with inside would be a magnified copy of the tool which is usable."
The test cubes have electropermanent magnets embedded into their sides to allow them to stick together. The magnetic effect can be switched on and off and does not require an electric current to remain active.
The cubes also contain a microprocessor to work out which of the magnets should be activated and when.
Each processor can currently store 32 kilobytes of code and has only two kilobytes of working memory - so the algorithm powering the process had to be kept simple.
The solution was to use a "subtractive" method - removing modules rather than adding them.
The first step works out what the original object looks like by covering it with the "pebbles".
"The idea is that they sense the border of the original shape - if a module detects it doesn't have a neighbour, it assumes it may be on the border of the shape," Mr Gilpin explained.
The cubes then message the shape of the original object to other "pebbles" a fixed distance away. These then define themselves as the perimeter of the duplicate object. If the replicated object is supposed to be five times the size of the original, then each square surrounding the object will map onto five cubes making up the reproduced perimeter.
All the cubes inside the duplicated border then recognise themselves to be part of the newly created tool.
"Once all those modules within the border have been notified and have confirmed their status, then we start the disassembly process," added Mr Gilpin.
"All the other bonds which are not crucial to the duplicate shape are broken, while the bonds between the modules in the shape are left intact - and so you are left with just the recreated shape when the process ends."
'A decade away'
Mr Gilpin admits a lot more work needs to be done, but he has an ambitious targets.
"It's not something that's going to happen in two years or necessarily five years," he said.
"But in 10 years you might see a product on the market that starts to rival traditional manufacturing approaches. I think we might all be surprised at how quickly this advances once people really start looking at the technology."
More details of the project will be presented to the IEEE International Conference on Robotics and Automation in St Paul, Minnesota next month.