Particle Swarm Optimisation implementation