Particle Swarm Optimization#
(PSO)
Inputs: population size \(n\), dimension \(d\), inertia weight \(w\), acceleration coefficients \(c_1, c_2\)
Output: best individual \(\mathbf{g}\)
Initialize \(X\)
while stopping criterion not met do
for \(i = 1, 2, \ldots, n\) do
\(V_i \leftarrow wV_i + c_1\mathbf{R}^\intercal (\mathbf{p}_i - X_i) + c_2\mathbf{R}^\intercal (\mathbf{g} - X_i)\)
\(X_i \leftarrow X_i + V_i\)
if \(f(X_i) < f(\mathbf{p}_i)\) then
\(\mathbf{p}_i \leftarrow X_i\)
if \(f(X_i) < f(\mathbf{g})\) then
\(\mathbf{g} \leftarrow X_i\)
Notation#
\(n\): population size
\(d\): dimension of particles
\(X\): population of particles, \(X \in \mathbb{R}^{N \times D}\)
\(X_i\): \(i\)-th particle
\(x_{i, j}\): \(j\)-th dimension of \(X_i\)
\(V\): velocity of particles
\(V_i\): velocity of \(i\)-th particle
\(v_{i, j}\): \(j\)-th dimension of \(V_i\)
\(w\): inertia weight
\(c_1, c_2\): acceleration coefficients
\(\mathbf{R}\): random vector in \([0, 1]^D\)
\(\mathbf{p}_i\): personal best of particle \(i\)
\(\mathbf{g}\): global best of particles