1 / 27

CS26110 AI Toolbox

CS26110 AI Toolbox. Evolutionary and Genetic Algorithms 3. http://www.youtube.com/watch?v=pTSAsmUsg20&feature=related. Today. Quick recap Genetic programming Recent bio-inspired methods Ants: ACO Swarms: PSO. The GA cycle. chosen parents. recombination. children. selection.

hart
Télécharger la présentation

CS26110 AI Toolbox

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. CS26110AI Toolbox Evolutionary and Genetic Algorithms 3

  2. http://www.youtube.com/watch?v=pTSAsmUsg20&feature=related

  3. Today • Quick recap • Genetic programming • Recent bio-inspired methods • Ants: ACO • Swarms: PSO

  4. The GA cycle chosen parents recombination children selection modification modified children parents evaluation population evaluated children deleted members discard

  5. Genetic programming • Devised by John Koza • 36 Human-Competitive Results Produced by Genetic Programming • http://www.genetic-programming.com/humancompetitive.html • http://dilan4.com/maths/countdown.htm

  6. Genetic programming √ + * B A A

  7. Koza’s algorithm • Trees consist of functions and terminals • Choose a set of functions and terminals, e.g { +, -, *, /, √}; {A,B} • Generate random programs (trees) which are syntactically correct • Follow a GA-like procedure • Evaluate fitness, select parents • Apply crossover and mutation

  8. Crossover / * A / X A - * √ / / A A B A A A A / A / * A - / / * A √ A A A A A B

  9. Examples • Evolving AI for snake game • http://www.gamedev.net/reference/articles/article1175.asp • Symbolic regression (function finding) • http://alphard.ethz.ch/gerber/approx/default.html • http://www.geneticprogramming.org/symbolic/main.htm • Moon lander! • http://genetic.moonlander.googlepages.com/

  10. Other bio-inspired approaches • Simulated annealing • Ant colony optimization (ACO) • Particle swarm optimization (PSO) • ...

  11. Ant Colony Optimization • Nature: unsupervised complex problem solving • Simple agents working locally, displaying global intelligence • Ants are capable of finding the shortest route between food source and nest • Also react to changes in environment (obstructions etc) nest food source

  12. Ant Colony Optimization • Shortest path is discovered via pheromone trails • Each ant moves ‘randomly’ • Pheromone is deposited on path • Ants detect lead ant’s path, inclined to follow • More pheromone on path increases probability of path being followed nest food source

  13. Ant Colony Optimization • Problem formulation for ACO • Graph representation (nodes and edges) • Heuristic desirability of edges • Construction of feasible solutions • Pheromone update rule (pheromone attached to edges) • Also we need a probabilistic transition rule • This evaluates the next step for an ant and considers both the heuristic desirability of an edge and the amount of pheromone deposited on the edge • The edge with the highest value of this combination is chosen by the artificial ant

  14. Ant Colony Optimization f a e b d {a,b,c,d} c

  15. ACO algorithm • Key idea: virtual pheromone accumulated on path edges • Algorithm for one ant: • Select starting node at random • While not-finished • Evaluate all edges from this node • Select the best-looking edge via probabilistic transition rule • Deposit artificial pheromone on the chosen edge • Finished path is a potential solution, analysed for optimality

  16. ACO algorithm (transition rule) Ants Choose next Evaluate continue position node Begin stop Gather Generate ants solutions Return best continue Evaluate stop Update solution position pheromone

  17. ACO: TSP Demo of ACO applied to large(ish) dynamic TSP (where cities are moved after a number of iterations) • http://www.tjhsst.edu/~rlatimer/techlab07/Students/RWard/ProjectV1-6/Project/tsp2.html • Performs well! • Combines heuristic knowledge with discovered knowledge

  18. Particle Swarm Optimization • Based on the flocking/swarming behaviour of birds/insects

  19. The basic idea • Each particle is searching for the optimum and encodes a solution (like the GA approach) • Each particle is moving (can’t search otherwise!), 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

  20. The basic idea • The particles in the swarm co-operate • They exchange information about what they’ve discovered in the places they have visited • The co-operation need only be 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

  21. Initialization: Positions and velocities

  22. What a particle does • In each time-step, a particle has to move to a new position • It does this by adjusting its velocity via: • The current velocity + • A weighted random portion in the direction of its personalbest + • A weighted random portion in the direction of the neighbourhoodbest + • A weighted random portion in the direction of the global best • Having worked out a new velocity, its position is simply its old position plus the new velocity

  23. PSO search

  24. Neighbourhoods geographical social

  25. Neighbourhoods Global

  26. PSO visualisation • http://www.projectcomputing.com/resources/psovis/index.html • More info on PSO • http://www.swarmintelligence.org/

  27. Summary • What we looked at: • Genetic algorithms • Genetic programming • Other bio-inspired techniques • These are often applied to search/optimisation problems that are very challenging

More Related