Want to read about a magic trick? I present to you a box, and in it is what just appears to be sand. If I pick up a handful, it will run through my fingers. Now would someone please give me an object, any object will do. I will just bury this in the sand, and with a press of a button and a little patience, I will pull out not only your object (thank you very much) but an exact or scaled up duplicate, made of sand.
Even without calling it a magic trick, this may seem like one, but researchers at MIT are working to make it real. Presently we do not have the technology to fit a self-sculpting system into a grain of sand, but the researchers did make centimeter wide cubes that do the trick. Within each cube is a small microprocessor with 32 KB of program code and 2 KB of working memory, and four electropermanent magnets. (Unlike electromagnets, electropermanent magnets keep their magnetism, or lack thereof, after power is shut off.) Due to size limitations, the cubes can only duplicate two dimensional structures, but the researchers found the algorithm for 2D duplication works in three dimensions as well, by stacking layers.
After an object is placed in amongst the sand or cubes, the devices can start polling each other, to identify their neighbors. If a device cannot find a neighbor on each side, then it must be on the edge of the container or the object I buried. This information allows the devices to create a map of the shape, which is then transmitted far enough away so a duplicate can be made without intersecting the original shape. The electropermanent magnets are used to hold together the devices that make the duplicate, as well as transfer information between the devices.
Someday we may see smart sand out there, but for now more work has to be done to miniaturize the technology. Until then, I will have to find a different act for my magic show.