Update: Particle Swarm Optimisation in Python
Dawid Laszuk published on
2 min,
209 words
It came to my attention that my PSO for Python is actually quite popular. Only after few people contacted me I've noticed that the public version was not the same that I've been using. It wasn't bad, but definitely not as good. Thus, obviously, I've updated the version and cleaned it a bit.
Update programme is available from my github or from Code subpage.
What's the difference? There are few.
- Initial values, unless provided, are psuedo-random generated using Halton sequence. This prevents from artificial clustering.
- Perturbation in form of a Gaussian noise should mitigate false local minima by forcing particles to search surrounding area.
- Added max_repetition threshold, which states the maximum number of obtaining the same optimum value. Upon reaching threshold program finishes.
- General improvement in performance.
- Improved usage documentation within the file.
- Program is now compatible with Python3.
Feel free to request any features.
There is an idea of adding progressive save, which would quit, resume and modify parameters at any point of computation.