Particles spread over the surface The map shows a surface from above: darker tones are higher. 12 particles were spread over the surface at random, each with a random velocity. The triangle marks the highest point. The particles do not know where it is; they can only measure the height where they stand.
Personal best and swarm best Each particle remembers the highest point it has found so far, its personal best. The swarm shares the best of all particles; the red ring is at that point, with height 0.602. As in a flock of birds, each particle looks both at its own experience and at the swarm.
Three pulls set the velocity The new velocity of the outlined particle is the sum of three terms. Inertia, w times the old velocity: 0.89 units. Pull toward its own best: 0.00, because in the first round the personal best is where the particle stands. Pull toward the swarm best: 2.38 units; each of the two pulls is multiplied by a random number r. The particle moved to the blue point, 1.80 units away.
Round 1 Height 0 1 Swarm best Round 1 Best: 0.701 All particles moved; the thin lines are their paths in the last rounds. The swarm best is 0.701. The particles are on average 3.42 units from the swarm best. Inertia carries them past the best point, so while gathering they also probe the area around it.
Round 5 Height 0 1 Swarm best Round 5 Best: 0.803 All particles moved; the thin lines are their paths in the last rounds. The swarm best is 0.803. The particles are on average 1.25 units from the swarm best. Inertia carries them past the best point, so while gathering they also probe the area around it.
Round 10 Height 0 1 Swarm best Round 10 Best: 0.828 All particles moved; the thin lines are their paths in the last rounds. The swarm best is 0.828. The particles are on average 1.06 units from the swarm best. Inertia carries them past the best point, so while gathering they also probe the area around it.
Round 20 Height 0 1 Swarm best Round 20 Best: 0.987 All particles moved; the thin lines are their paths in the last rounds. The swarm best is 0.987. The particles are on average 0.59 units from the swarm best. Inertia carries them past the best point, so while gathering they also probe the area around it.
Round 40 Height 0 1 Swarm best Round 40 Best: 1.000 All particles moved; the thin lines are their paths in the last rounds. The swarm best is 1.000. The particles are on average 0.31 units from the swarm best. Inertia carries them past the best point, so while gathering they also probe the area around it.
The swarm found the highest point Height 0 1 Swarm best Round 40 Best: 1.000 The swarm best is 1.000; the highest point has height 1 and the swarm best is close to it. The swarm first got there in round 14. The particles used no derivative; they only measured heights and told each other.