Swarms of robots are getting closer and closer to moving around like a colony of insects. At the University of Pennsylvania's GRASP Laboratory, Alex Kushleyev, Daniel Mellinger and Vijay Kumar developed an algorithm that allows a group of tiny quadcopter robots to fly in formation, get around obstacles, and find each other again in the air when the patterns are disrupted.

PHOTOS: Top 10 Robot Talents

Small robots have demonstrated group behavior before — such as the kilobot project, in which many simple machines can behave as though directed, using simple rules. And there have been proposals for swarming robots to clean up oil spills.

DNEWS VIDEO: Robotic Snails May Save Lives

This project is an extension of one the same group did in last year, when the mini-helicopters built a tower all by themselves. And given that the robots are flying, the robots' behavior has to be more complex than either on the land or floating in the ocean.

These robots can behave like a swarm of insects, able to fly around without hitting each other. They can stay stable even when they are thrown in the air, and do aerobatic stunts like barrel rolls and loops. But the most important thing is the programming — these 'bots can follow complex patterns and maintain them, and even make three-dimensional formations that are a challenge for human pilots in real planes, let alone robots.

BLOG: Robot Builds Itself With Foam

The point of this is to have networks of robots that don't need a "leader," and can still complete a task even if one or more robots is disabled or damaged. The military is, of course interested in making drones cheaper, smaller and more reliable, but there are other uses too, such as search and rescue missions where you need to look at a large area but can't afford to deploy whole helicopter or airplane squadrons.

Thankfully for the paranoid, the robots aren't smart enough to come up with their own ideas about what they should do – yet.

Image: KMel Robotics