A robot developed by roboticists at the University of Pennsylvania is comprised of modules that can recognize each other. This video shows how the modules reassemble themselves after the robot has been kicked apart.
But this is just the beginning.
DARPA programme manager Mitch Zakin is pursuing what he calls "programmable matter" -- so-called "mesoscale" mini-machines, a millimetre to a centimetre in size, that can arrange themselves to form whatever shape is desired.
Initially, he expects the outcome to be devices the size of small Lego pieces, but as the technology improves the modules and the machines could be scaled down even further.
Just how much further?
Ultimately, says Zakin, you could tell a sack of "smart sand" what to do, and the grains would assemble themselves into a hammer, a wrench or even a morphing robotic aircraft.
"It's making machines more like materials, and materials more like machines," says Daniela Rus, a robotics researcher at the Massachusetts Institute of Technology.