From Concept to Apply with Particle Swarm Optimization, Utilizing Python | by Piero Paialunga | Sep, 2024

There’s a joke that cracks me up:

“Do you know that, earlier than the clock was invented, folks needed to actively roam round and ask folks the time?”

There’s clearly no want to clarify the joke, but when we had been to overthink it just a little bit (like good mathematicians do) we will say that the joke is about the truth that the data of a particle of a bunch can be utilized to tell all the opposite particles. This idea is definitely manner deeper than the joke I simply mentioned and might be exploited additional.

Let’s think about a self-organized system, comparable to chook flocking or fish education. We are able to outline this technique as one manufactured from particles (e.g. a particle is a chook). We are able to additionally assume with a great diploma of approximation that these particles transfer round in area adjusting their positions primarily based on two components:

  • The very best place that the precise particle is aware of: what the chook thinks is greatest for themselves.
  • The world greatest place that’s given by all of the particles “speaking” with one another: what the chook is instructed to do by the “most important chook”