Researchers have built a robot that self-assembles and can do a variety of tasks.