MDCHAMP / FreeLunch

Meta-heuristic optimisation suite for python
https://pypi.org/project/freelunch/
MIT License
46 stars 3 forks source link

PSO doesn't return solutions in order #6

Closed TimothyRogers closed 3 years ago

TimothyRogers commented 3 years ago

Solutions returned from particle swarm optimiser are not in order of quality.

MDCHAMP commented 3 years ago

Just needs a commit adding something like

return sorted([ p.as_sol() for p in pop ], key=lambda p: p.fitness)

I'm not a GH power user enough to know how to commit to your branch <- caveman brain

I've added the line for PSO but still need to add something similar for the KrillHerd <- big brain

MDCHAMP commented 3 years ago

Closed with 4946aec