1 / 20

Particle Swarm Optimization

Jo Skjermo IDI/NTNU Jo.skjermo@idi.ntnu.no. Particle Swarm Optimization. Artificial life. A-Life studies how computational techniques can help when studying biological phenomena A-Life studies how biological techniques can help out with computational problems For example

havard
Télécharger la présentation

Particle Swarm Optimization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Jo Skjermo IDI/NTNU Jo.skjermo@idi.ntnu.no Particle Swarm Optimization

  2. Artificial life • A-Life studies how computational techniques can help when studying biological phenomena • A-Life studies how biological techniques can help out with computational problems For example • artificial neural network is a simplified model of humanbrain. • genetic algorithm is inspired by the human evolution.

  3. Flocking • Simple «stupid» individuals • But the flock seems smart • with coordinated behaviour • The whole is greater than the sum of its parts(Aristotle)

  4. swarmintelligence • Why? Among other things: the social aspect • Interaction with the environment • Interaction with each other • Simple individuals • Ants • Bees • “Particles”? • Collective behavior better then individual • Beehive • Anthill

  5. Some history - Boids • Craig Reynolds, 1986 • Acomputer model of coordinated animal motion such as bird flocks and fish schools. • Flocks, herds, and schools: A distributed behavioral model. ACM Computer Graphics, 21(4):25–34, 1987. • http://www.red3d.com/cwr/boids/ • 3 simple rules for each individual • Cohesion: steer to • move toward the average • position of local flockmates • Alignment: steer • towards the average • heading of local flockmates Separation: steer to avoid crowding local flockmates

  6. Movie

  7. ParticleSwarmOptimization • James Kennedy and Russell Eberhart. 1995 • Particleswarmoptimization. In Proceedings of IEEE International Conference on Neural Networks • Added some more simple rules to each individual… • Roost: steer towards the “roost” • Memory: remember when is wasclosest to the “roost” • Communication: tell everyone else where is was closest to the “roost” Aftersome time, all boidslandedontheroost Figures: Marco A. Montes de Oca

  8. PSO – thebasicidea • Roost = an unknown function, or unknown parameters to a function • Boids = particles that “Fly around” in the search space • Will the boid ‘land’ at the minimum?

  9. Basic, fullyconnected PSO • p is the best “position” the particle has seen this far. • g is the best “position” all the particles has seen this far (if fully connected). • r1 and r2 are random values in the range [0, 1) • c1 is a weight for the local attraction in the range [0, 2) • c2 is a weight for the global attraction in the range [0, 2) Pro tip 1: you might consider using a weight on the inertia also Pro tip 2: use random x(t)’s (positions) at the first iteration Pro tip 3: you might consider clamping you velocity between a min and max value Inertia Particleselfmemory Global influence (social part) New velocity=

  10. PSO – thebasicidea • New “position” is calculated as • previous position + new velocity

  11. PSO – assignment • You will implement your own PSO • You will implement your own PSO • You will implement your own PSO • You will implement your own PSO • You will implement your own PSO • You will implement your own PSO • We will check (i.e. you must deliver your code) • Yes, you can work in groups of two

  12. PSO – Task 1

  13. PSO – thecircle problem (sometimesknown as thesphere problem) • f(u1,…,ux) = ( (u1 * u1) + … + (ux * ux)) • The 1D case: • f(u1) = u1*u1 • Eks: f(2) = 2*2 = 4 • Task 1: • Fitnesfunction is f(u) • Use PSO to find a «u» thatminimizes f(u)… • Hint: f(0.0) = 0.0 • Pro Hint 2D case: f(0.0, 0.0)=0.0

  14. PSO – Task 2

  15. PSO • Task 2 • a)particle should use only the 3 “nearest” neighbors when computing the social part of velocity vector update. • i.e. dynamic sub-swarms • Hint: g(t) • b) see given formula • As given: multiply inertia with a decreasing weight, so that inertia decreases • Alternatively, you can decrease-weight the whole velocity vector (state it in the report if you do)

  16. PSO – Task 3

  17. PSO • Task 3 • NOTE! • You will find solutions/positions that is not valid (weight > 1000kg) • Several methods to handle this… • Don’t update fitness • Negative fitness • Throw away solution, make a random new one • Choose one (and be prepared for questions during demo)

  18. PSO – Task 4

  19. PSO • Task 4 • To make life simpler for yourself, init with a fixed seed for your randoms (while testing/developing)

  20. PSO • Next lectures… • 5 Nov • Answering questions • 13 Nov (not the 12’th) 12 to 13/14'ish • Answering questions (at room 360 IT-Vest) • Yes, you can work in groups of two • Pay attention to the home page for making arrangements/booking time for demonstration • Yes, a small written report (and the code) must be delivered at the same time as the demonstration.

More Related