
Swarm behaviour, or swarming, is a
collective behaviour
The expression collective behavior was first used by Franklin Henry Giddings and employed later by Robert Park and Ernest Burgess, Herbert Blumer, Ralph H. Turner and Lewis Killian, and Neil Smelser to refer to social processes and events ...
exhibited by entities, particularly animals, of similar size which aggregate together, perhaps milling about the same spot or perhaps moving ''en masse'' or
migrating in some direction. It is a highly interdisciplinary topic.
As a term, ''swarming'' is applied particularly to insects, but can also be applied to any other entity or animal that exhibits swarm behaviour. The term ''
flocking'' or ''murmuration'' can refer specifically to swarm behaviour in birds, ''
herding
Herding is the act of bringing individual animals together into a group ( herd), maintaining the group, and moving the group from place to place—or any combination of those. Herding can refer either to the process of animals forming herds i ...
'' to refer to swarm behaviour in
tetrapods
Tetrapods (; ) are four-limb (anatomy), limbed vertebrate animals constituting the superclass Tetrapoda (). It includes extant taxon, extant and extinct amphibians, sauropsids (reptiles, including dinosaurs and therefore birds) and synapsids (p ...
, and
''shoaling'' or ''schooling'' to refer to swarm behaviour in fish.
Phytoplankton
Phytoplankton () are the autotrophic (self-feeding) components of the plankton community and a key part of ocean and freshwater ecosystems. The name comes from the Greek words (), meaning 'plant', and (), meaning 'wanderer' or 'drifter'.
P ...
also gather in huge swarms called
''blooms'', although these organisms are
algae
Algae ( , ; : alga ) are any of a large and diverse group of photosynthetic, eukaryotic organisms. The name is an informal term for a polyphyletic grouping that includes species from multiple distinct clades. Included organisms range from ...
and are not self-propelled the way animals are. By extension, the term "swarm" is applied also to inanimate entities which exhibit parallel behaviours, as in a
robot swarm, an
earthquake swarm, or a swarm of stars.
From a more abstract point of view, swarm behaviour is the collective motion of a large number of
self-propelled entities. From the perspective of the mathematical modeller, it is an
emergent
Emergent may refer to:
* ''Emergent'' (album), a 2003 album by Gordian Knot
* Emergent (software), Neural Simulation Software
* Emergent BioSolutions, a multinational biopharmaceutical company headquartered in Gaithersburg, Maryland, USA
* Emerg ...
behaviour arising from simple rules that are followed by individuals and does not involve any central coordination. Swarm behaviour is also studied by
active matter physicists as a phenomenon which is not in
thermodynamic equilibrium
Thermodynamic equilibrium is an axiomatic concept of thermodynamics. It is an internal state of a single thermodynamic system, or a relation between several thermodynamic systems connected by more or less permeable or impermeable walls. In ther ...
, and as such requires the development of tools beyond those available from the
statistical physics of systems in thermodynamic equilibrium. In this regard, swarming has been compared to the mathematics of
superfluids, specifically in the context of
starling flocks (murmuration).
Swarm behaviour was first simulated on a computer in 1986 with the simulation program
boids.
This program simulates simple
agents (boids) that are allowed to move according to a set of basic rules. The model was originally designed to mimic the flocking behaviour of birds, but it can be applied also to schooling fish and other swarming entities.
Models
In recent decades, scientists have turned to modeling swarm behaviour to gain a deeper understanding of the behaviour.
Mathematical models

Early studies of swarm behaviour employed mathematical models to simulate and understand the behaviour. The simplest mathematical models of animal swarms generally represent individual animals as following three rules:
* Move in the same direction as their neighbours
* Remain close to their neighbours
* Avoid collisions with their neighbours
The
boids computer program, created by
Craig Reynolds in 1986, simulates swarm behaviour following the above rules.
Many subsequent and current models use variations on these rules, often implementing them by means of concentric "zones" around each animal. In the "zone of repulsion", very close to the animal, the focal animal will seek to distance itself from its neighbours to avoid collision. Slightly further away, in the "zone of alignment", the focal animal will seek to align its direction of motion with its neighbours. In the outermost "zone of attraction", which extends as far away from the focal animal as it is able to sense, the focal animal will seek to move towards a neighbour.
The shape of these zones will necessarily be affected by the sensory capabilities of a given animal. For example, the visual field of a bird does not extend behind its body. Fish rely on both vision and on
hydrodynamic perceptions relayed through their
lateral lines, while Antarctic
krill rely both on vision and hydrodynamic signals relayed through
antennae.
However recent studies of starling flocks have shown that each bird modifies its position, relative to the six or seven animals directly surrounding it, no matter how close or how far away those animals are.
Interactions between flocking starlings are thus based on a
topological, rather than a metric, rule. It remains to be seen whether this applies to other animals. Another recent study, based on an analysis of high-speed camera footage of flocks above Rome and assuming minimal behavioural rules, has convincingly simulated a number of aspects of flock behaviour.
Evolutionary models
In order to gain insight into why animals evolve swarming behaviours, scientists have turned to evolutionary models that simulate populations of evolving animals. Typically these studies use a
genetic algorithm
In computer science and operations research, a genetic algorithm (GA) is a metaheuristic inspired by the process of natural selection that belongs to the larger class of evolutionary algorithms (EA). Genetic algorithms are commonly used to gen ...
to simulate
evolution
Evolution is change in the heritable characteristics of biological populations over successive generations. These characteristics are the expressions of genes, which are passed on from parent to offspring during reproduction. Variation ...
over many generations. These studies have investigated a number of hypotheses attempting to explain why animals evolve swarming behaviours, such as the
selfish herd theory the predator confusion effect, the dilution effect, and the many eyes theory.
Agents
*
Self-organization
Emergence
The concept of emergence—that the properties and functions found at a hierarchical level are not present and are irrelevant at the lower levels–is often a basic principle behind
self-organizing systems
Self-organization, also called spontaneous order in the social sciences, is a process where some form of overall order arises from local interactions between parts of an initially disordered system. The process can be spontaneous when suff ...
.
An example of
self-organization in biology leading to emergence in the natural world occurs in ant colonies. The queen does not give direct orders and does not tell the ants what to do. Instead, each ant reacts to stimuli in the form of chemical scents from larvae, other ants, intruders, food and buildup of waste, and leaves behind a chemical trail, which, in turn, provides a stimulus to other ants. Here each ant is an autonomous unit that reacts depending only on its local environment and the genetically encoded rules for its variety. Despite the lack of centralized decision making, ant colonies exhibit complex behaviours and have even been able to demonstrate the ability to solve geometric problems. For example, colonies routinely find the maximum distance from all colony entrances to dispose of dead bodies.
Stigmergy
A further key concept in the field of swarm intelligence is
stigmergy.
[Parunak, H. v D. (2003)]
"Making swarming happen"
In: Proceedings of Conference on Swarming and Network Enabled Command, Control, Communications, Computers, Intelligence, Surveillance and Reconnaissance (C4ISR), McLean, Virginia, USA, 3 January 2003. Stigmergy is a mechanism of indirect coordination between agents or actions. The principle is that the trace left in the environment by an action stimulates the performance of a next action, by the same or a different agent. In that way, subsequent actions tend to reinforce and build on each other, leading to the spontaneous emergence of coherent, apparently systematic activity. Stigmergy is a form of self-organization. It produces complex, seemingly intelligent structures, without need for any planning, control, or even direct communication between the agents. As such it supports efficient collaboration between extremely simple agents, who lack any memory, intelligence or even awareness of each other.
[
]
Swarm intelligence
Swarm intelligence is the collective behaviour
The expression collective behavior was first used by Franklin Henry Giddings and employed later by Robert Park and Ernest Burgess, Herbert Blumer, Ralph H. Turner and Lewis Killian, and Neil Smelser to refer to social processes and events ...
of decentralized, self-organized systems, natural or artificial. The concept is employed in work on artificial intelligence
Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machine
A machine is a physical system using Power (physics), power to apply Force, forces and control Motion, moveme ...
. The expression was introduced by Gerardo Beni and Jing Wang in 1989, in the context of cellular robotic systems.
Swarm intelligence systems are typically made up of a population of simple agents such as boids interacting locally with one another and with their environment. The agents follow very simple rules, and although there is no centralized control structure dictating how individual agents should behave, local, and to a certain degree random, interactions between such agents lead to the emergence
In philosophy, systems theory, science, and art, emergence occurs when an entity is observed to have properties its parts do not have on their own, properties or behaviors that emerge only when the parts interact in a wider whole.
Emergen ...
of intelligent global behaviour, unknown to the individual agents.
Swarm intelligence research is multidisciplinary. It can be divided into natural swarm research studying biological systems and artificial swarm research studying human artefacts. There is also a scientific stream attempting to model the swarm systems themselves and understand their underlying mechanisms, and an engineering stream focused on applying the insights developed by the scientific stream to solve practical problems in other areas.
Algorithms
Swarm algorithms follow a Lagrangian approach or an Eulerian approach. The Eulerian approach views the swarm as a field, working with the density of the swarm and deriving mean field properties. It is a hydrodynamic approach, and can be useful for modelling the overall dynamics of large swarms. However, most models work with the Lagrangian approach, which is an agent-based model
An agent-based model (ABM) is a computational model for simulating the actions and interactions of autonomous agents (both individual or collective entities such as organizations or groups) in order to understand the behavior of a system and what ...
following the individual agents (points or particles) that make up the swarm. Individual particle models can follow information on heading and spacing that is lost in the Eulerian approach.
Ant colony optimization
Ant colony optimization is a widely used algorithm which was inspired by the behaviours of ants, and has been effective solving discrete optimization
Discrete optimization is a branch of optimization in applied mathematics and computer science.
Scope
As opposed to continuous optimization, some or all of the variables used in a discrete mathematical program are restricted to be discrete var ...
problems related to swarming. The algorithm was initially proposed by Marco Dorigo in 1992,[M. Dorigo, ''Optimization, Learning and Natural Algorithms'', PhD thesis, Politecnico di Milano, Italie, 1992.] and has since been diversified to solve a wider class of numerical problems. Species that have multiple queens may have a queen leaving the nest along with some workers to found a colony at a new site, a process akin to