bic pso
TRANSCRIPT
![Page 1: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/1.jpg)
Particle Swarm optimisation
![Page 2: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/2.jpg)
These slides adapted from a presentationby [email protected] - one of the
main researchers in PSO
PSO invented by Russ Eberhart (engineering Prof) and James Kennedy (social scientist)
in USA
![Page 3: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/3.jpg)
Explore PSO and its parameters with my appat http://www.macs.hw.ac.uk/~dwcorne/mypages/apps/pso.html
![Page 4: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/4.jpg)
Cooperation example
![Page 5: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/5.jpg)
Particle Swarm optimisation
The basic idea� Each particle is searching for the optimum � Each particle is moving and hence has a
velocity.� Each particle remembers the position it was
in where it had its best result so far (its personal best)
� But this would not be much good on its own; particles need help in figuring out where to search.
![Page 6: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/6.jpg)
Particle Swarm optimisation
The basic idea II� The particles in the swarm co-operate. They exchange
information about what they’ve discovered in the places they have visited
� The co-operation is very simple. In basic PSO it is like this:– A particle has a neighbourhood associated with it.– A particle knows the fitnesses of those in its
neighbourhood, and uses the position of the one with best fitness.
– This position is simply used to adjust the particle’s velocity
![Page 7: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/7.jpg)
Initialization. Positions and velocities
![Page 8: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/8.jpg)
Particle Swarm optimisation
What a particle does� In each timestep, a particle has to move to a
new position. It does this by adjusting its velocity. – The adjustment is essentially this:– The current velocity PLUS– A weighted random portion in the direction of its personal best
PLUS– A weighted random portion in the direction of the neighbourhood best.
� Having worked out a new velocity, its position is simply its old position plus the new velocity.
![Page 9: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/9.jpg)
Neighbourhoods
geographicalsocial
![Page 10: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/10.jpg)
Neighbourhoods
Global
![Page 11: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/11.jpg)
The circular neighbourhood
Virtual circle
1
5
7
6 4
3
8 2Particle 1’s 3-
neighbourhood
![Page 12: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/12.jpg)
Particles Adjust their positions according to a ``Psychosocial compromise’’ between what an individual is comfortable with, and what society reckons
Here I am!
The best perf. of my neighbours
My best perf.
x pg
pi
v
![Page 13: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/13.jpg)
Particle Swarm optimisation
Pseudocodehttp://www.swarmintelligence.org/tutorials.php
Equation (a)v[] = c0 *v[] + c1 * rand() * (pbest[] - present[]) + c2 * rand() * (gbest[] - present[])
(in the original method, c0=1, but many researchers now play with this parameter)
Equation (b)present[] = present[] + v[]
![Page 14: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/14.jpg)
Particle Swarm optimisation
Pseudocodehttp://www.swarmintelligence.org/tutorials.php
For each particle Initialize particleEND
Do For each particle Calculate fitness value If the fitness value is better than its peronal best
set current value as the new pBest End
Choose the particle with the best fitness value of all as gBest For each particle Calculate particle velocity according equation (a) Update particle position according equation (b) End While maximum iterations or minimum error criteria is not attained
![Page 15: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/15.jpg)
Particle Swarm optimisation
Pseudocodehttp://www.swarmintelligence.org/tutorials.php
Particles' velocities on each dimension are clamped to a maximum velocity Vmax. If the sum of accelerations would cause the velocity on that dimension to exceed Vmax, which is a parameter specified by the user. Then the velocity on that dimension is limited to Vmax.
![Page 16: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/16.jpg)
Play with DWC’s app for a while
![Page 17: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/17.jpg)
Particle Swarm optimisation
Parameters� Number of particles (swarmsize)� C1 (importance of personal best)� C2 (importance of neighbourhood best)
� Vmax: limit on velocity
![Page 18: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/18.jpg)
How to choose parameters The right way
This way
Or this way
![Page 19: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/19.jpg)
Particle Swarm optimisation
Parameters� Number of particles (10—50) are reported as usually
sufficient.� C1 (importance of personal best)� C2 (importance of neighbourhood best)� Usually C1+C2 = 4. No good reason other
than empiricism� Vmax – too low, too slow; too high, too
unstable.
![Page 20: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/20.jpg)
Some functions often used for testing real-valued optimisation algorithms
Rosenbrock
Griewank Rastrigin
![Page 21: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/21.jpg)
... and some typical results
30D function PSO Type 1" Evolutionaryalgo.(Angeline 98)
Griewank [±300] 0.003944 0.4033
Rastrigin [±5] 82.95618 46.4689
Rosenbrock [±10] 50.193877 1610.359
Optimum=0, dimension=30Best result after 40 000 evaluations
![Page 22: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/22.jpg)
This is from Poli, R. (2008). "Analysis of the publications on the applications of particle swarm optimisation". Journal of Artificial Evolution and Applications 2008: 1–10.
![Page 23: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/23.jpg)
So is this
![Page 24: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/24.jpg)
So is this
![Page 25: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/25.jpg)
Particle Swarm optimisation
� Epistemy Ltd
![Page 26: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/26.jpg)
Adaptive swarm sizeThere has been enough improvement
but there has been not enough improvement
although I'm the worst
I'm the best
I try to kill myself
I try to generate a new particle
![Page 27: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/27.jpg)
Adaptive coefficients
The better I am, the more I follow my own way
The better is my best neighbour, the more I tend to go towards him
αvrand(0…b)(p-x)
![Page 28: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/28.jpg)
How and when should an excellent algorithm terminate?
![Page 29: Bic pso](https://reader034.vdocuments.net/reader034/viewer/2022042817/55a6a5f71a28abdf2e8b46ad/html5/thumbnails/29.jpg)
How and when should an excellent algorithm terminate?
Like this