You get a bonus - 1 coin for daily activity. Now you have 1 coin

Flocking as a Behaviour

Lecture



A flock of birds in flight or while feeding

Flocking as a Behaviour

Two flocks of common cranes

Flocking as a Behaviour

A flock resembling a swarm of starlings

Flocking is a behavior exhibited when a group of birds, called a flock, forages for food or flies together.

Computer simulations and mathematical models developed to imitate the flocking behavior of birds can generally also be applied to the "flocking" behavior of other species. As a result, the term "flock" in computer science is sometimes applied to species other than birds.

This article is devoted to modeling flocking behavior. From the point of view of the mathematical modeler, "flock" is the collective motion of a group of self-propelled entities and a collective animal behavior exhibited by many living beings such as birds, fish, bacteria, and insects. It is considered an emergent behavior arising from simple rules that are followed by individuals and does not require any central coordination.

In nature

There are parallels with shoals of fish, swarms of insects, and the herding behavior of land animals. In the winter months, starlings gather into huge flocks of hundreds to thousands of individuals, known as murmurations, which, when they all take off together, create spectacular displays of intricate swirling patterns in the sky above onlookers.

. Flocking behavior was first simulated on a computer in 1987 by Craig Reynolds with his simulation program Boids. This program simulates simple agents (boids) that are allowed to move according to a set of basic rules. The result resembles a flock of birds, a school of fish, or a swarm of insects.

Measurement

Measurements of flocks of birds have been made using high-speed cameras, and computer analysis has been carried out to test the simple flocking rules mentioned above. These rules were found to be generally true for flocks of birds, but the long-distance attraction rule (cohesion) applies to the nearest 5-10 neighbors of a flocking bird and is independent of the distance of those neighbors from the bird. In addition, there is anisotropy with respect to this tendency toward cohesion, with greater cohesion shown toward neighbors to the side of the bird rather than in front or behind. This is undoubtedly related to the fact that the field of view of a flying bird is directed to the sides rather than straight ahead or behind.

Another recent study is based on the analysis of high-speed camera video footage of flocks over Rome and uses a computer model assuming minimal behavioral rules.

Algorithm

Rules

The basic models of flocking behavior are governed by three simple rules:

  1. Separation - avoid crowding neighbors (short-range repulsion)
  2. Alignment - steer towards the average heading of neighbors
  3. Cohesion - steer towards the average position of neighbors (long-range attraction)

With these three simple rules, the flock moves in an extremely realistic manner, creating complex motions and interactions that would otherwise be extremely difficult to create.

The basic model has been extended in various ways since Reynolds proposed it. For example, Delgado-Mata et al. extended the basic model to include fear effects. Smell was used to communicate emotions between animals via pheromones modeled as particles in a freely expanding gas. Hartman and Benes added an extra force they call leadership change. This factor determines a bird's chance of becoming a leader and attempting to flee. Hemelrijk and Hildenbrandt used attraction, alignment, and avoidance, and extended this with a number of traits of real starlings: first, the birds fly according to fixed-wing aerodynamics, banking when turning (thereby losing lift); second, they coordinate with a limited number of interacting neighbors, seven (as in real starlings); third, they try to stay above their roosting site (as starlings do at dawn), and when they happen to move away from the roost, they return to it by turning back; fourth, they move at a relatively fixed speed. The authors showed that these flight-behavior features, together with the large flock size and the small number of interaction partners, were essential to producing the variable shapes of starling flocks.

Complexity

In flocking simulations there is no centralized control; each bird behaves autonomously. In other words, each bird must decide for itself which other birds to consider as part of its neighborhood. The neighborhood is usually defined as a circle (2D) or a sphere (3D) with a certain radius (representing its range of perception).

The naive implementation of the flocking algorithm has complexity Flocking as a Behaviour- each bird looks at every other bird to find those that fall within its neighborhood.

Possible improvements:

  • Bin-lattice spatial subdivision. The entire area in which the flock can move is divided into a number of bins (containers). Each bin stores information about the birds within it. Every time a bird moves from one bin to another, the lattice must be updated.
    • Example: a 2D (3D) grid in 2D (3D) flocking simulations.
    • Complexity: Flocking as a Behaviour, k - the number of surrounding bins to consider; this holds precisely when the bird's bin is located at Flocking as a Behaviour

Lee Spector, Jon Klein, and Chris Perry studied the emergence of collective behavior in evolutionary computation systems.

Bernard Chazelle proved that, under the assumption that each bird adjusts its speed and position relative to other birds within a fixed radius, the time required to reach a steady state is an iterated exponential of a logarithmic height in the number of birds. This means that if the number of birds is large enough, the convergence time will be so large that it may effectively be infinite. This result applies only to convergence to a steady state. For example, an arrow shot into the air at the edge of a flock will trigger a reaction throughout the whole flock faster than can be explained by neighbor-to-neighbor interactions alone, which are slowed by the time delay in a bird's central nervous system as the signal passes from bird to bird.

Applications

Flocking as a BehaviourFlock-like behavior can be observed in humans when people are drawn to a common focal point or when they are repelled, as shown below: a crowd fleeing the sound of gunfire.Flocking as a Behaviour

In Cologne, Germany, two biologists from the University of Leeds demonstrated flocking behavior in humans. A group of people displayed behavior very similar to that of a flock: if 5% of the group changed direction, the rest would follow their example. When one person was designated as a predator and everyone else had to avoid him, the group behaved very much like a school of fish.

Flocking has also been considered as a means of controlling the behavior of unmanned aerial vehicles ( UAVs).

Flocking is a common technology in screensavers that has also found application in animation. Flocking has been used in many films to create more realistic crowd movement. Tim Burton's Batman Returns (1992) features flocks of bats, and Disney's The Lion King (1994) features a wildebeest stampede.

Flocking behavior has been used for other interesting applications. It has been applied to the automatic programming of multichannel internet radio stations. It has also been used for information visualization and for optimization tasks.

See also

  • Crowd
  • [[b99]]
  • [[b12782]]
created: 2024-12-02
updated: 2026-03-09
131



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Robotics"

Terms: Robotics