26  Particle Swarm Optimization

\begin{algorithm} \caption{Particle Swarm Optimization} \begin{algorithmic} \Procedure{PSO}{$n, d, w, c_1, c_2$} \State Initialize population $X$ \While{stopping criterion not met} \For{$i = 1$ to $n$} \State $V_i \gets wV_i + c_1\mathbf{R}^\intercal (\mathbf{p}_i - X_i) + c_2\mathbf{R}^\intercal (\mathbf{g} - X_i)$ \State $X_i \gets X_i + V_i$ \If{$f(X_i) < f(\mathbf{p}_i)$} \State $\mathbf{p}_i \gets X_i$ \If{$f(X_i) < f(\mathbf{g})$} \State $\mathbf{g} \gets X_i$ \EndIf \EndIf \EndFor \EndWhile \State \textbf{return} best individual $\mathbf{g}$ \EndProcedure \end{algorithmic} \end{algorithm}

26.1 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

26.2 Update Equations

\[ 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 \]