The particles of a swarm are visualized as small blue spheres intersecting the function surface.
Left Mouse Button: Rotate
Middle Mouse Button: Zoom
Right Mouse Button: Move
1: Fitness Functions: Here the user has the choice between five different fitness functions (for more details see below under "Available Fitness Functions"). The optimization task of the Particle Swarm is to find the minimum of the functions. All functions are plotted with a color code where red represents lower and yellow higher function values
2: PSO Properties: These settings apply to both PSO Types(3), the user can choose of how many particles a swarm consists and how many epochs the optimization process will run
3: PSO-Types: Choose one of the two PSO Types available. The Constriction Type is the default one.
4: Standard PSO Parameters: Different PSO parameters can be adjusted for the standard implementation (these settings have no effect on the Constriction Type PSO). You may experience strong effects on the behaviour of the particles and thus on the PSO performance when varying these parameters
5: Optimization Panel: Once a Fitness Function is chosen, the optimization process can be started by pressing the "Start Optimization" Button. The "Stop/Clear Optimization" Button will stop a running process and clean the function from the particles as well as the "Optimization Progress" Window (10). A running optimization can also be paused and continued by pressing the corresponding buttons.
6: Movement Delay: The movement delay value determines how much time passes between the display of two epochs. This value does not have any influence on the behaviour of the swarm, it only influences the visualization of the movement of the particles (higher values lead to slower movement).
7: Value Range: The value range determines on one hand for which value range the function is plotted, on the other hand also in which value range the swarm particles are initialized. Varying this value leads to a "zoom in" or "zoom out".
8: Grid Resolution: The resolution of the function plots can be altered here. Higher values lead to more detailed plots, but can affect negativly the graphics performance. Too high resolutions can also cause memory problems.
9: Rendering properties:
- Show Function Minimum: Shows a line which intersects the function in its minimum
- Show Path of best Particles: Draws a line whereas each vertex point represents the best point visited by any particle of the whole swarm so far. Often the path can be better seen when the function is looked at from underneath.
- Wireframe Rendering: Switch between Wireframe and Solid Function Rendering. Wireframe rendering can be buggy depending on the hardware and the drivers used.
- Hide outliers: As in this PSO implementation the particles can also move out of their initialization value range, the user can choose whether to visualize particles even when they are out of the given value range or only when they are within it (default is to hide them).
10: Optimization Progress: A Text window where each time the swarm has found a better point in the fitness landscape the epoch number and the function value f(x,y) for this point are displayed
11: Screenshot Panel: The Capture Image Button allows the user to take a snapshot of the graphic canvas in jpg format. The path to save the files can be chosen by the user in the popup window
- White Background: Changes the background to white, of course this function is not limited to the screen capture function, but usually a black background delivers a better visisbility
12: Help Bar: Informations about the actual state of the program, actions that can be taken and further information will be displayed here
Available Fitness Functions:
Rosenbrock:global minimum: f(x)=0; x(i)=1, i=1:n
Rastrigin:global minimum: f(x)=0; x(i)=0, i=1:n
Griewangk:global minimum: f(x)=0; x(i)=0, i=1:n
De Jongs’s Sphere:global minimum: f(x)=0; x(i)=0, i=1:n
Schaffer F6:global minimum: f(x,y)=0; x=0 y=0;
Short Introduction in Particle Swarm Optimization:
The PsoVis Applet serves as a 3d visualization of the optimization process of Particle Swarm Optimization (PSO).
With this tool it is possible to have a look at the movement of the particles of a Particle Swarm (visualized as small blue spheres)s which have the task here of minimizing a predefined fitness function that can be chosen by the user. The fitness functions can be visualized and optimized in a user-chosen value range.
It is also possible to to select between two different PSO implementations and to vary different rendering properties, PSO properties and PSO parameters.
Particle Swarm Optimization (PSO):
PSO is a biological motivated optimization paradigm which involves “social” interaction between individuals of a population. These individuals, also called particles, can move through a multidimensional search-space in order to find an optimum. Particles can change their movement directions and velocities according to the information which they themselves and the whole swarm has gathered so far from the fitness landscape.
Each particle remembers its own best position it has encountered by then while all particles know about the overall best position which has been found by all particles of the swarm.
From this information and each particle's current velocity vector new velocity vectors are calculated and the positions of the particles are updated. Different parameter settings can influence the behavior of the swarm, for example its ability to converge.
In this PSO implementation the trajectory of each particle can be calculated in two ways:
I Standard Type PSO:
The velocity vector for the particles is calculated as following:
where xi and vi are the current position and velocity of the i-th particle, pi and pb are the best positions found by the i-th particle and by the best particle out of the swarm, n1 and n2 are parameters which allow to weight the influence of the "individual" and the “social knowledge”. The individual and social parameters determine how much the particles are influenced by their own found optimum and the overall found optimum by the swarm; c is a so-called constriction factor to dampen the particle movements, r1 and r2 are random numbers between 0 and 1 which add a stochastic component to the behavior of the swarm. In this Standard PSO implementation there is a so called adaptive Inertia Weight i, which is linearly varied over the optimization process from a start value to an end value.
For the Standard Type PSO a limit Vmax can be set for the velocity, all velocity values exceeding this limit are set to the specified maximal value.
I Constriction Type PSO:
The velocity vector for the particles is calculated slightly different from above:
K is the so-called "Constriction Factor" which influences the velocity of the particles by dampening it.
Updating the positions:
In both PSO implementations the particles positions are updated by applying Eq.3: