Attempt to implement Particle Swarm Optimisation