A swarm of miniature robots acting independently of one another but cooperating as a group to build the same structure has been developed by scientists who were inspired by the team effort of termite colonies that build 8-foot mud towers above their nests. They believe that robotic swarms could one day be used to help build a space base on Mars.

The robot brick layers work by the same autonomous principles of social insects where individuals act on their own but to a set of simple rules laid down for the overall benefit of the colony, scientists said.

Like social insects, the robots are programmed to observe the behaviour of their colleagues and act according to a set of simple “traffic” rules. It led to the robots laying foam bricks one on top of another to build towers, castles and pyramids, bringing extra wherever they were needed.

Download the new Independent Premium app Sharing the full story, not just the headlines

"The key inspiration we took from termites is the idea that you can do something really complicated as a group, without a supervisor, and secondly that you can do it without everybody discussing explicitly what's going on, but just by modifying the environment," said Professor Radhika Nagpal of Harvard University.

The robots, called Termes, are as big as a child’s lunchbox and move forward and backwards, and can turn and climb. They carry one brick at a time and drop it directly in front whenever they detect a spare place in the structure.

Each robot obeys a predetermined set of “traffic rules” and keeps track on its own location with respect to an original “seed brick” that was used to start the structure. The process is fundamentally different from the way human construction sites are organised on a hierarchy of commands, sad Justin Werfel of Harvard.

"Normally, at the beginning, you have a blueprint and a detailed plan of how to execute it, and the foreman goes out and directs his crew, supervising them as they do it. In insect colonies, it's not as if the queen is giving them all individual instructions. Each termite doesn't know what the others are doing or what the current overall state of the mound is,” Dr Werfel said.