A robot swarm might sound like something from a sinister science fiction movie. But in the real world, a swarm of robots could do a lot of good. They could clear a beach of garbage, retrieve plastic from the ocean or build a habitable abode on Mars. But the concept depends on getting scores of robots to work together effectively and avoid getting in each other’s way.