
In
computational science
Computational science, also known as scientific computing, technical computing or scientific computation (SC), is a division of science, and more specifically the Computer Sciences, which uses advanced computing capabilities to understand and s ...
, particle swarm optimization (PSO)
[ is a computational method that optimizes a problem by iteratively trying to improve a ]candidate solution
In mathematical optimization and computer science, a feasible region, feasible set, or solution space is the set of all possible points (sets of values of the choice variables) of an optimization problem that satisfy the problem's constraints, ...
with regard to a given measure of quality. It solves a problem by having a population of candidate solutions, here dubbed particle
In the physical sciences, a particle (or corpuscle in older texts) is a small localized object which can be described by several physical or chemical properties, such as volume, density, or mass.
They vary greatly in size or quantity, from s ...
s, and moving these particles around in the search-space according to simple mathematical formulae
Mathematical notation consists of using symbols
A symbol is a mark, sign, or word that indicates, signifies, or is understood as representing an idea, object, or relationship. Symbols allow people to go beyond what is known or seen ...
over the particle's position
Position often refers to:
* Position (geometry), the spatial location (rather than orientation) of an entity
* Position, a job or occupation
Position may also refer to:
Games and recreation
* Position (poker), location relative to the dealer
* ...
and velocity
Velocity is a measurement of speed in a certain direction of motion. It is a fundamental concept in kinematics, the branch of classical mechanics that describes the motion of physical objects. Velocity is a vector (geometry), vector Physical q ...
. Each particle's movement is influenced by its local best known position, but is also guided toward the best known positions in the search-space, which are updated as better positions are found by other particles. This is expected to move the swarm toward the best solutions.
PSO is originally attributed to Kennedy, Eberhart and Shi[ and was first intended for simulating social behaviour,][ as a stylized representation of the movement of organisms in a bird flock or ]fish school
In biology, any group of fish that stay together for social reasons are shoaling, and if the group is swimming in the same direction in a coordinated manner, they are schooling. In common usage, the terms are sometimes used rather loosely. Ab ...
. The algorithm was simplified and it was observed to be performing optimization. The book by Kennedy and Eberhart[ describes many philosophical aspects of PSO and swarm intelligence. An extensive survey of PSO applications is made by ]Poli
DNA polymerase iota is an enzyme that in humans is encoded by the ''POLI'' gene. It is found in higher eukaryotes, and is believed to have arisen from a gene duplication from Pol η. Pol ι, is a Y family polymerase that is involved in transl ...
.[ In 2017, a comprehensive review on theoretical and experimental works on PSO has been published by Bonyadi and Michalewicz.][
PSO is a ]metaheuristic
In computer science and mathematical optimization, a metaheuristic is a higher-level procedure or heuristic designed to find, generate, tune, or select a heuristic (partial search algorithm) that may provide a sufficiently good solution to an op ...
as it makes few or no assumptions about the problem being optimized and can search very large spaces of candidate solutions. Also, PSO does not use the gradient
In vector calculus, the gradient of a scalar-valued differentiable function f of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p gives the direction and the rate of fastest increase. The g ...
of the problem being optimized, which means PSO does not require that the optimization problem be differentiable
In mathematics, a differentiable function of one real variable is a function whose derivative exists at each point in its domain. In other words, the graph of a differentiable function has a non- vertical tangent line at each interior point in ...
as is required by classic optimization methods such as gradient descent
Gradient descent is a method for unconstrained mathematical optimization. It is a first-order iterative algorithm for minimizing a differentiable multivariate function.
The idea is to take repeated steps in the opposite direction of the gradi ...
and quasi-newton methods. However, metaheuristics such as PSO do not guarantee an optimal solution is ever found.
Algorithm
A basic variant of the PSO algorithm works by having a population (called a swarm) of candidate solution
In mathematical optimization and computer science, a feasible region, feasible set, or solution space is the set of all possible points (sets of values of the choice variables) of an optimization problem that satisfy the problem's constraints, ...
s (called particles). These particles are moved around in the search-space according to a few simple formulae. The movements of the particles are guided by their own best-known position in the search-space as well as the entire swarm's best-known position. When improved positions are being discovered these will then come to guide the movements of the swarm. The process is repeated and by doing so it is hoped, but not guaranteed, that a satisfactory solution will eventually be discovered.
Formally, let ''f'': ℝ''n'' → ℝ be the cost function which must be minimized. The function takes a candidate solution as an argument in the form of a vector
Vector most often refers to:
* Euclidean vector, a quantity with a magnitude and a direction
* Disease vector, an agent that carries and transmits an infectious pathogen into another living organism
Vector may also refer to:
Mathematics a ...
of real number
In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s and produces a real number as output which indicates the objective function value of the given candidate solution. The gradient
In vector calculus, the gradient of a scalar-valued differentiable function f of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p gives the direction and the rate of fastest increase. The g ...
of ''f'' is not known. The goal is to find a solution a for which ''f''(a) ≤ ''f''(b) for all b in the search-space, which would mean a is the global minimum.
Let ''S'' be the number of particles in the swarm, each having a position xi ∈ ℝ''n'' in the search-space and a velocity vi ∈ ℝ''n''. Let pi be the best known position of particle ''i'' and let g be the best known position of the entire swarm. A basic PSO algorithm to minimize the cost function is then:[
for each particle ''i'' = 1, ..., ''S'' do
Initialize the particle's position with a uniformly distributed random vector: xi ~ ''U''(blo, bup)
Initialize the particle's best known position to its initial position: pi ← xi
if ''f''(pi) < ''f''(g) then
update the swarm's best known position: g ← pi
Initialize the particle's velocity: vi ~ ''U''(-, bup-blo, , , bup-blo, )
while a termination criterion is not met do:
for each particle ''i'' = 1, ..., ''S'' do
for each dimension ''d'' = 1, ..., ''n'' do
Pick random numbers: ''r''p, ''r''g ~ ''U''(0,1)
Update the particle's velocity: vi,d ← w vi,d + φp ''r''p (pi,d-xi,d) + φg ''r''g (gd-xi,d)
Update the particle's position: xi ← xi + vi
if ''f''(xi) < ''f''(pi) then
Update the particle's best known position: pi ← xi
if ''f''(pi) < ''f''(g) then
Update the swarm's best known position: g ← pi
The values blo and bup represent the lower and upper boundaries of the search-space respectively. The w parameter is the inertia weight. The parameters φp and φg are often called cognitive coefficient and social coefficient.
The termination criterion can be the number of iterations performed, or a solution where the adequate objective function value is found.] The parameters w, φp, and φg are selected by the practitioner and control the behaviour and efficacy of the PSO method (below
Below may refer to:
*Earth
*Ground (disambiguation)
*Soil
*Floor
* Bottom (disambiguation)
*Less than
*Temperatures below freezing
*Hell or underworld
People with the surname
* Ernst von Below (1863–1955), German World War I general
* Fred Belo ...
).
Parameter selection
The choice of PSO parameters can have a large impact on optimization performance. Selecting PSO parameters that yield good performance has therefore been the subject of much research.[
To prevent divergence ("explosion") the inertia weight must be smaller than 1. The two other parameters can be then derived thanks to the constriction approach,] or freely selected, but the analyses suggest convergence domains to constrain them. Typical values are in