Particle Swarm Optimization (PSO)
PSO is the canonical swarm metaheuristic, developed by J. Kennedy & R. Eberhart (1995). A swarm of particles flies through the search space; each particle is pulled toward its own best position (cognitive term) and the swarm’s best (social term), with momentum. Source: andrey-dik‘s MQL5 implementation (plus a modified variant, PSOm).
How it works
Each particle updates velocity then position:
- Velocity:
v(t+1) = w·v(t) + c1·rp·(p − x) + c2·rg·(g − x)—winertia,c1cognitive weight (pull to personal bestp),c2social weight (pull to global bestg),rp/rgrandom in [0,1]. - Position:
x(t+1) = x(t) + v(t+1).
Early iterations disperse to explore; convergence comes from “attracting all particles to the particle with the best solution” (exploit). See exploration-vs-exploitation.
Distinctive weakness
Particles change coordinates with near-unity probability each step, so they “oscillate, at best, somewhere in the local extremum” — Dik flags “fast and premature convergence” and “poor scalability.” His PSOm (probabilistic coordinate copying from fitter particles) failed to improve it.
Benchmark (context-relative)
In this article’s early scoring (3 functions — Skin/Forest/Megacity — over a small field), PSO scored 0.47695, below the RND random-search baseline (0.51254): strong on smooth low-dim (0.984 on 2-param Skin) but collapsing with dimension (→0.087 on 1000-param). Dik: “very weak and not suitable for optimizing complex and even more so discrete functions.” A pointed no-free-lunch-theorem datum — the field’s most famous swarm method loses to random search on this suite. Note this is the earlier, small-field methodology, not the mature %-of-MAX rating used for the founding four (see that page’s methodology note).
Related
metaheuristic-optimization · exploration-vs-exploitation · population-optimization-benchmark · no-free-lunch-theorem · andrey-dik · grey-wolf-optimizer · ant-colony-optimization