Add Genetic Algorithm or Particle Swarm Optimizer to scipy.optimize?

Would the community be interested in the addition of a genetic algorithm (GA) or particle swarm optimizer (PSO) to the scipy.optimize module? I wrote them as kind of a passion project for my own use, but I’d love to adapt them and get them on here. And be able to get feedback and contributions from others!

Edit: Just joined the forum so if this has already been brought up as a topic and I’ve just missed it (I looked), please let me know!

optimize.differential_evolution is a type of genetic algorithm.
I would say the more interesting thing to suggest would be PSO. How much variation is there in different PSO implementations? I’m asking to see if your implementation is close to ‘mainstream’ - we get a lot of support questions along the lines of “But Smith and Doe (1799) do this, why does your implementation do that?”.

See the discussion here for the kinds of things that need to be addressed, particularly this comment and this one.

Perfect answer, thank you! I hadn’t made the connection that the differential_evolution algorithm was a GA. I’ll look into your questions on my PSO implementation. I put it together after reading through a textbook, but I’m not sure how ‘mainstream’ it is compared to other implementations. I’ll also work on getting it up to scipy standards and benchmarked in the meantime. It seems like there’s not a desire to add optimizers that don’t add value in some way over what’s already in the module. Thanks Andy!

Id say running it through the benchmarks first is the thing to do, don’t work on it too much, until more people have voiced their thoughts.

I now know that there’s lots of PSO variants, and a good general purpose one would be wanted.