particle-swarm-optimization

Particle Swarm Optimization

The purpose of this project is to show the use of PSO (Particle Swarm Optimization) methods in minimization problems. This particular example is focused on finding the minimal value of a function. It is applied only for two dimensional functions (which made possible to graphically represent algorithm’s execution) but can be extended to any number of dimensions. Used functions:

For more details (formula/representation) on optimisation functions (including the used ones) consult this Wiki page.

Another swarm intelligence based algorithm can be found here - Ant Colony Optimization.

Solution

By running the application it can be seen that the system is initialized with a randomly placed particles - which represents the initial solution in the function’s visible domain. It tries to improve the solution gradually moving each particle closer to a possible solution. Eventually all particles will gather in a single point representing the minimal value.

Interface

demo

There is a graphical representation of the problem on the left side and control panel on the right.

Graphic

The functions origin is in the middle of the image, the color represents function value taking each points coordinates as input values, the dots represent the particles.

Control

Parameters:

Best result is displayed on the bottom.