PSO basic implementation