By using a computer-controlled magnetic field, the researchers turned the bacteria into fully-compliant biological nanorobots.
The trick was using a type of microbe known as magnetotactic bacteria. These critters have little internal compasses, and will follow the pull of a magnetic field. By manipulating a magnetic field, the researchers tricked the bacteria into forming a giant, computer-controlled swarm. In one experiment, the researchers had the bacterial swarm assemble a small pyramid.