Washington - Engineers in the US have built a swarm of 1,000 little robots that can shuffle into specific formations on command.

Each of the identical robots is given a picture of the required shape, and then they work together to make it happen. It takes up to 12 hours, but then this is the biggest throng of robots ever built and studied in this way. Inspired by biological examples, like cells forming organs or ants building bridges, the work could help develop self-assembling tools and structures. ‘Each robot is identical and we give them all the exact same program,’ explained Dr Michael Rubenstein, the first author of the study, which is published in Science.

‘The only thing they have to go on, to make decisions, is what their neighbours are doing.’ The robots are 3cm across and cylindrical - about the size of a sushi roll. Dr Rubenstein and his colleagues at Harvard University dubbed them ‘Kilobots’ and built 1,024 of them altogether: the same as the number of bytes in a kilobyte.

Each Kilobot shuffles on three straight, spindly legs, chosen because they are cheaper than wheels. The robots’ arena is a large wooden square, about the size of a tournament snooker table, complete with edges to stop them waddling off the edge. At the start of an experiment, the whole bristling crowd is bunched up together on one side.

Overhead hangs an infrared light, which can communicate with the swarm thanks to an infrared sensor nestled on each robot’s underside. That light only sends one command, however: ‘go’. A random selection will start first, if they are in a position to move: inching slowly around the table and flashing their own infra-red lights to broadcast information to the other Kilobots nearby.

So that they know where to start the shape they’ve been programmed to make, four ‘seed’ robots have already been placed in a suitable position by one of the scientists.

 The seed robots kick off a coordinate system, which spreads through the swarm via those infrared lights, bouncing off the table from any transmitting robot to anyone ‘listening’ within 10cm.

‘Each robot looks at its current state - so, what have I done in the past - and also looks at what its neighbours are doing, based on communication. And it makes its own decisions,’ Dr Rubenstein told the BBC. ‘Running this identical program, all the robots are capable of taking turns to join the shape.’ Individually, the Kilobots have very limited capabilities and they also make mistakes. But the algorithm made specially to govern their behaviour is able to overcome these limitations.

In designing their robotic swarm, the researchers drew inspiration particularly from ants. Masses of army ants, Dr Rubenstein explained, also assemble themselves into structures (like nests and rafts) that defy the limitations of an individual six-legged specimen. ‘The structures that ants form are relatively different from the structure that we were able to form, but it’s the same type of principle,’ he said. The whole process is also incredibly time consuming.

Dr Rubenstein said he hasn’t taken his Kilobot show on the road anywhere, and doesn’t even tidy the robots away when they’re finished: ‘We just leave them sitting on the table. It would take a couple of hours to pack them into a box.’ Even watching the programmed images take shape, over six to 12 hours, is far from a spectator sport. ‘It wasn’t very exciting,’ said Dr Rubenstein, who ‘usually stuck around’ to take notes, in case of a mishap. ‘Actually watching the experiment run is like watching paint dry.’