teeline · algorithms/pso
Particle Swarm Optimisation
A swarm of tour-particles updates each epoch. Each particle's velocity is a list of city-swap moves built from three components: ω keeps momentum from the previous epoch, C₁ pulls toward the particle's own personal best, and C₂ pulls toward the global best. Inertia ω decays over time, shifting the swarm from exploration toward exploitation.
Particles
02370
12074
22179
32000
41592
52104
● gbest tour● best particle● swarm● city
Press Step or Run to begin
ω (inertia) = 0.900
High — broad exploration
epoch
0
gbest dist
1592.4
avg dist
2053
v_max
5 swaps
Balanced swarm size