Skip to main content
. 2019 Apr 11;19(7):1736. doi: 10.3390/s19071736
Algorithm 1. Simple particle swarm optimization (PSO) pseudocode.
1. begin
2. initialize
3. for i in n_iterations = k
4.   for each position p of particle compute fitness
5.     if fitness (p) > fitness (pbest)
6.       pbest = p
7.   set best of pbest as gbest
8.   update particles velocity and position
9. gbest is our result