Termites can create mounds that are hundreds of times their own size, working independently without communication or a leader. Inspired by the creatures, scientists have created robots that use just a few simple rules and environmental cues to build castle-like structures and pyramids.

The robots all work independently. Each travels along a grid and can move, climb a step and lift and put down bricks. And they use sensors to detect other robots and existing bricks, and react to these stimuli according to a simple set of rules, such as when to lay a brick or climb a step higher. The template for each three-dimensional structure is translated into a specific set of 'traffic rules' and combined with fixed laws of robot behaviour, says co-author Justin Werfel, a computer scientist at Harvard University in Cambridge, Massachusetts. His team's results appear today in Science1.

The idea of combining traffic rules and robot behaviour is “brilliant from an engineering perspective”, says Alcherio Martinoli, a roboticist at the Swiss Federal Institute of Technology in Lausanne. “It just decouples a complex reverse-engineering problem into two pieces of information which have to work together,” says Martinoli, who was not involved in the work.

Robots are useful in places that for humans would be “dirty, dangerous and dull”, says Werfel. This means that such swarms could be useful for the first construction project on Mars, or in the more immediate future, for building levees to protect against flooding. Independently acting robots make for a robust system, he adds. “If some got swept away by the flood, the others wouldn’t have to change what they’re doing.”

Another advantage is scalability, he says. "If you wanted to take the system and apply it to a much bigger flood, all you have to do is add more. Nothing in their programming depends on how many there are.”