

Giving robotic sand the power to self-assemble into objects doesn't seem like the best idea; but what do I know? I don't work at MIT. I've just seen The Mummy enough to know I don't like scarabs or vicarious faces made in the sand...
Either way, MIT is working feverishly to create these fears. Shown above is an image of their new toys they call 'smart pebbles'. Not quite the 'dumb pebbles' us normal people play with, these little guys are packing electromagnets and microprocessors which they utilize for communication and bonding. The idea here is to have these cubes, and ultimately smaller sand sized counterparts, that are capable of being aware of objects they are in contact with, and then replicating those objects...
It seems the difficult part is the "thinking" that the cubes must do. Algorithms are being developed that rely on little resources and are capable of performing such a complex task as mimicry. Check out a video of how they are accomplishing the task...
Sources...
Self-sculpting sand [MIT] via MIT 'smart sand' and 'robot pebbles' replicate objects [CNET]