Particles (cyan trail = personal best)
Global incumbent best
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.
Particle Swarm Optimization borrows its update rule from flocking behavior: every candidate solution ("particle") nudges its velocity toward the best position it has personally found and toward the best position known within its neighborhood, then moves. This simulator runs a real PSO search over the Rastrigin benchmark function, rendered as a 3D terrain riddled with local minima around one true global optimum, and lets you switch the neighborhood structure that decides which particles influence each other — a fully-connected global-best swarm versus a sparse local-best ring — to see firsthand how topology trades convergence speed against resistance to getting stuck in a local optimum.