nathanrooy / particle-swarm-optimization

Learn about particle swarm optimization (PSO) through Python!
GNU General Public License v3.0
255 stars 123 forks source link

How do I save the output of the optimisation to a variable? #7

Closed zohimchandani closed 3 years ago

nathanrooy commented 4 years ago

Just replace this line: https://github.com/nathanrooy/particle-swarm-optimization/blob/master/pso/pso_simple.py#L104 with: return pos_best_g