Basic PSO algorthm implemented