In particle swarm optimization (PSO), a position vector gives a particle’s current coordinates in the search space. Think of it as a pin on a map: moving the pin proposes a different solution. In a two-coordinate problem, the position is (x, y); in a larger search space, it has a coordinate for each dimension. section 7.4
A position has several jobs during a PSO run:
- Start somewhere: initialize each particle at a random position, spread across the search space so the swarm can explore different regions. section 7.6
- Measure a candidate: calculate fitness at the particle’s current position to judge how good that solution is. section 7.5
- Move and remember: update the position using velocity, then compare the new fitness with earlier results. Keep track of the particle’s best position and the swarm’s best position. section 7.4 section 7.5
A two-coordinate move
Suppose a particle is at (-1, 9). In the worked update, its next position is (0.52, 10.52): each coordinate has increased by 1.52. That new pair is another candidate solution, so its fitness must be evaluated again. The particle’s current position can change without erasing the best position it has found. section 7.8 section 7.4
In a simple Python particle, x and y store the current position, while best_x and best_y store its remembered best. Velocity controls the next move; inertia, the particle’s own best result, and the swarm’s best result influence that velocity. The practical takeaway: a position is the solution being tested now, not necessarily the best solution found so far. section 7.4 section 7.8


