Flocking (behavior)

From Wikipedia, the free encyclopedia

Jump to: navigation, search

Flocking is a common demonstration of emergence and emergent behavior, first simulated in 1986 by Craig Reynolds with his simulation program, Boids. It is a simulation of simple agents which are allowed to move, with basic rules governing their movement. The result is alike to a flock of birds, a school of fish, or a swarm of insects.

Two flocks of Common Cranes
Two flocks of Common Cranes

Basic flocking is controlled by three simple rules:

  1. Separation - avoid crowding neighbours
  2. Alignment - steer towards average heading of neighbours
  3. Cohesion - steer towards average position of neighbours

With these three simple rules, the flock moves in an extremely realistic way, creating complex motion and interaction that would be extremely hard to create otherwise.

Flocking is a common technology in screensavers, and has found its use in animation. Flocking has been used in many films (Gabbai 2005) to generate crowds which move more realistically. Tim Burton's Batman Returns (1992) featured flocking penguins, and Disney's The Lion King (1994) included a wildebeest stampede.

From a practical perspective, flocking has been considered as a means to control the behavior of Unmanned Air Vehicles (UAVs) (Gabbai 2005).

In flocking simulations, there is no central control; each bird behaves autonomously. The three simple rules described above are applied not to the entire flock, but only to local flockmates; each bird has to decide for itself which flocks fall into its environment (typically defined as a circle (in 2D flocks) or orb (in 3D flocks) with a certain radius).

A basic implementation of a flocking algorithm therefore has complexity O(n2) because every bird has to calculate its distance from every other bird in the entire flock in order to decide whether or not it falls into its environment.

An accepted solution to this complexity problem is bin-lattice spatial subdivision. By using this technique the entire area the flock can move in is divided into a large number of bins. This would be a 2D grid in a 2D flocking simulation, or a 3D grid in a 3D flocking simulation. In the simulation, there is a global register which stores which bins contain which bird. Each time a bird moves from one bin to another, it updates its location in this global register.

This decreases the complexity of the flocking algorithm enormously, since bird do not need to check their position against all other birds. They only have to look in the register to see which birds are close enough to possibly be in their local environment.

The complexity of the flocking algorithm is then reduced from O(n2) to O(n * k), which resolves into O(n) when k is a constant.

Lee Spector, Jon Klein, Chris Perry and Mark Feinstein studied the emergence of collective behavior in evolutionary computation systems.[1]

  1. ^ Spector, L.; Klein, J.; Perry, C.; and Feinstein, M. (2003). Emergence of Collective Behavior in Evolving Populations of Flying Agents. Proceedings of the Genetic and Evolutionary Computation Conference (GECCO-2003). Springer-Verlag. Retrieved on 2007-05-01.
  • Gabbai, J. M. E. (2005), written at Manchester, Complexity and the Aerospace Industry: Understanding Emergence by Relating Structure to Performance using Multi-Agent Systems, University of Manchester Doctoral Thesis link

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.