Each particle in the swarm represents a potential solution and has a position and a velocity. Particles adjust their positions based on their own experience and the experience of neighboring particles. The movement is influenced by two components: the cognitive component (the particle’s own best-known position) and the social component (the swarm’s global best-known position).