Scientists in the US have created miniature robots that act together as a "swarm" to form a 1,000-strong army.
The soldier-like devices, each measuring a few centimetres across, were created to demonstrate how simple machines can display complex self-organising behaviour.
Given electronic command the Kilobots begin to blink infra-red signals to each other and arrange themselves into a five-pointed star.
Similarly, they can be made to form letters of the alphabet, using vibrations to slide across surfaces on three rigid pin-like legs.
US lead scientist Professor Radhika Nagpal said: "The beauty of biological systems is that they are elegantly simple - and yet, in large numbers, accomplish the seemingly impossible.
"At some level you no longer even see the individuals; you just see the collective as an entity to itself."
The Kilobots, which resemble moving transistors, are given no direct information about their global position but collectively construct a co-ordinated system.