National Geographic has just published an article on swarm behaviour in animals and how this is being applied to understanding human behaviour and improving complex systems.
The article looks at how whole groups of animals seem to have intelligence, while individually they only seem to be able to perform very simple actions.
One of the big discoveries in this area is that complex problem solving behaviours can emerge from a group of individuals who each follow simple rules.
The article also mentions Craig Reynolds, a computer scientist who has been working on computer simulations of flocking behaviour.
He has a fantastic page with animated demonstrations and explanations of his work if you want to see how it all fits together.
This technology was used to simulate flocks in Hollywood movies like Batman Begins but is also being used by everyone from the military to internet technology companies in an attempt to develop distributed but efficient problem solving systems.