Presentation is loading. Please wait.

Presentation is loading. Please wait.

Algorithms and their Applications CS2004 ( )

Similar presentations


Presentation on theme: "Algorithms and their Applications CS2004 ( )"— Presentation transcript:

1 Algorithms and their Applications CS2004 (2012-2013)
Dr Stephen Swift 14.1 Ant Colony Optimisation and Particle Swarm Optimisation

2 Previously On CS2004… So far we have looked at:
Concepts of computation and algorithms Comparing algorithms Some mathematical foundation The Big-Oh notation Computational complexity Data structures Sorting algorithms Hill Climbing and Simulated Annealing Tabu Search and Iterated Local Search Applications and Optimisation Genetic Algorithms Evolutionary Computation and Related Topics Ant Colony Optimisation and Particle Swarm Optimisation

3 This Lecture In this lecture we are going to cover: Swarm Intelligence
Ant Colony Optimisation Particle Swarm Optimisation Ant Colony Optimisation and Particle Swarm Optimisation

4 Swarm Intelligence A new field of study
<25 years old Before the mid 80s Artificial Intelligence (AI) was: Symbol based Focused on reasoning, knowledge, planning, ... New problem domains emerged that involved the environment changing dynamically E.g. telecommunications and scheduling These problems cannot be framed by calculations and simple algorithms Holland’s Genetic Algorithm created a new way of thinking Behaviour based AI Intelligence is controlled by a set of independent semi autonomous modules Ant Colony Optimisation and Particle Swarm Optimisation

5 Recap: Complexity The interaction of many simple parts creating complex behaviour Not to be confused with Computational Complexity) – but easily done! The net effect is greater than the sum of the individuals, e.g. ant colonies Emergent behaviour as a side effect of the system Often incorporates elements of Chaos Theory, Artificial Life and Artificial Intelligence Ant Colony Optimisation and Particle Swarm Optimisation

6 Social Insects Several million years of success
Efficient Flexible Robust Can solve many problems: Find food, feed the brood, defend the nest Build a nest … Ant Colony Optimisation and Particle Swarm Optimisation

7 Flocking “Boids” model created by Craig Reynolds in 1987
Boids =“bird-oid” objects (also schooling fish) Video links: Only three simple rules … Ant Colony Optimisation and Particle Swarm Optimisation

8 Boid Rules Rule 1: Separation Rule 2: Alignment Rule 3: Cohesion
Steer to avoid crowding local flock-mates Rule 2: Alignment Steer towards the average heading of local flock-mates Rule 3: Cohesion Steer to move toward the average position of local flock-mates Ant Colony Optimisation and Particle Swarm Optimisation

9 Swarm Intelligence – Part 1
First used by Beni, Hackwood and Wang in 1989 for work on cellular robotic systems Later: for anything swarm inspired Ant Colony Optimisation and Particle Swarm Optimisation

10 Swarm Intelligence – Part 2
Study of collective behaviour of decentralised, self-organised systems No central control Only simple rules for each individual Simple but extremely powerful The problems are usually difficult to define Solutions result from the behaviour and interactions between individual agents Solutions are emergent in the systems Ant Colony Optimisation and Particle Swarm Optimisation

11 Swarm Intelligence Algorithms
Most Popular Algorithms Ant Colony Optimisation (ACO) Particle Swarm Optimisation (PSO) More esoteric Bacteria Colony Optimisation Plant Propagation Algorithms Strawberry Plant Ant Colony Optimisation and Particle Swarm Optimisation

12 Ant Colony Optimisation
First proposed by Marco Dorigo in 1992 A Heuristic optimisation method inspired by biological systems A multiple agent based approach for solving difficult combinatorial optimisation problems Mainly Graph based problems Traveling Salesman, vehicle routing, sequential ordering, graph colouring, routing in communications networks, etc… Ant Colony Optimisation and Particle Swarm Optimisation

13 Ant Behavior Ants (blind) navigate from nest to food sources
The shortest path is discovered via pheromone trails Each ant moves at random Pheromone is deposited onto the path Ants detect the lead ants path and are inclined to follow More pheromone on the path means an increased probability of the path being followed Pheromone upgrade: evaporation Ant Colony Optimisation and Particle Swarm Optimisation

14 Dealing With Obstacles
The more ants follow a trail, the more attractive to follow that trail becomes Ant Colony Optimisation and Particle Swarm Optimisation

15 Stigmergy Indirect coordination/communication between agents or actions Individual behaviour modifies the environment, which in turn modifies the behaviour of other individuals Stimulates the performance of subsequent actions leading to the spontaneous emergence of coherent, apparently systematic activity Reduces (or eliminates) communications between agents Supports efficient collaboration between simple agents Produces complex, seemingly intelligent structures, without need for any planning, control, or even direct communication between the agents Ant Colony Optimisation and Particle Swarm Optimisation

16 Route Selection At the beginning of the search process, a constant amount of pheromone is assigned to all arcs When located at a node i an ant k uses the pheromone trail to compute the probability of choosing j as the next node: The probability is zero for nodes that are unreachable from node i Similar to Roulette Wheel Selection in a Genetic Algorithm Ant Colony Optimisation and Particle Swarm Optimisation

17 Pheromone Update The pheromone value of an arc (i,j) is updated when traversed by ant k as follows: The probability of an arc being taken by subsequent ants is proportional to how “good” it was deemed by ants that have already traversed it Ant Colony Optimisation and Particle Swarm Optimisation

18 Pheromone Evaporation
The pheromones “evaporate” by applying the following equation to all the arcs: Here p  (0,1) is a parameter An iteration is a complete cycle involving the ant’s movement, pheromone depositing and pheromone evaporation Ant Colony Optimisation and Particle Swarm Optimisation

19 ACO Flowchart Have the stopping criteria been met?
START Have the stopping criteria been met? Locate ants randomly at different nodes YES NO Determine the shortest tour until now and update pheromone STOP Determine probabilistically as to which node to visit next NO Record the length of tour Is the trail complete? Move to next node YES Ant Colony Optimisation and Particle Swarm Optimisation

20 ACO Advantages Can be used in dynamic applications
Adapts to changes such as new distances, etc… Similar to GAs, good choice for constrained discrete problems Not a gradient based algorithm Performs better against other global optimisation techniques Neural Networks, Genetic Algorithms, Simulated Annealing, under certain conditions Convergence is “guaranteed” Compared to GAs (Genetic Algorithms): Retains memory of the colony instead of previous generation only Less affected by poor initial solutions (due to combination of random path selection and colony memory) Ant Colony Optimisation and Particle Swarm Optimisation

21 ACO Disadvantages Theoretical analysis is difficult
Due to sequences of random decisions (not independent) Probability distribution changes by iteration Research is experimental rather than theoretical Time to convergence uncertain Slower convergence sometimes than other Heuristics Performed poorly for large scale problems E.g. more than 75 cities when solving the TSP No centralised processor to guide the ants towards good solutions Ant Colony Optimisation and Particle Swarm Optimisation

22 ACO Applications Graph based and combinatorial optimisation type problems, e.g. TSP (Travelling Salesman Problem) Vehicle Routing Graph Colouring Timetable Scheduling Manufacturing Scheduling Network Routing Etc... Ant Colony Optimisation and Particle Swarm Optimisation

23 Particle Swarm Optimisation (PSO)
It was developed in 1995 by James Kennedy (social psychologist) and Russell Eberhart (electrical engineer) Population based stochastic optimisation technique It uses a number of agents (particles) that constitute a swarm moving around in the search space looking for the best solution Each particle is treated as a point in an n-dimensional space which adjusts its “flying” according to its own flying experience as well as the flying experience of other particles Ant Colony Optimisation and Particle Swarm Optimisation

24 PSO Concepts – Part 1 Each particle keeps track of its coordinates in the solution space and associated fitness, along with the best solution and fitness it has achieved so far This value is called the personal best, pbest The PSO algorithm also tracks the best value obtained so far by any particle in swarm This value is called the global best, gbest The basic concept of PSO lies in accelerating each particle toward its pbest and the gbest locations, with a random weighted acceleration at each time step Ant Colony Optimisation and Particle Swarm Optimisation

25 PSO Concepts – Part 2 Each particle tries to modify its position using the following information: The current position The current velocity The distance between the current position and pbest The distance between the current position and gbest Ant Colony Optimisation and Particle Swarm Optimisation

26 PSO Concepts – Part 3 y x sk : current position in the search space
sk+1: modified position vk: current velocity vk+1: modified velocity vpbest: velocity based on pbest vgbest: velocity based on gbest Ant Colony Optimisation and Particle Swarm Optimisation

27 PSO Update Formulae  (inertia), and  are parameters...
Particle i velocity at iteration k+1 Particle i best position Particle i position at iteration k Position of global best  (inertia), and  are parameters... Ant Colony Optimisation and Particle Swarm Optimisation

28 Loop until max iterations
PSO Flow Chart START Initialise particles with random position and velocity vectors For each particle’s position (p) evaluate fitness Loop until all particles exhausted If fitness(p) better than fitness(pbest) then pbest= p Loop until max iterations Update gbest Update particles velocity and position STOP: giving gbest, optimal solution Ant Colony Optimisation and Particle Swarm Optimisation

29 PSO Simulation 1 max y min fitness x search space
Ant Colony Optimisation and Particle Swarm Optimisation

30 PSO Simulation 2 max y min fitness x search space
Ant Colony Optimisation and Particle Swarm Optimisation

31 PSO Simulation 3 max y min fitness x search space
Ant Colony Optimisation and Particle Swarm Optimisation

32 PSO Simulation 4 max y min fitness x search space
Ant Colony Optimisation and Particle Swarm Optimisation

33 PSO Simulation 5 max y min fitness x search space
Ant Colony Optimisation and Particle Swarm Optimisation

34 PSO Simulation 6 max y min fitness x search space
Ant Colony Optimisation and Particle Swarm Optimisation

35 PSO Simulation 7 max y min fitness x search space
Ant Colony Optimisation and Particle Swarm Optimisation

36 PSO Simulation 8 max y min fitness x search space
Ant Colony Optimisation and Particle Swarm Optimisation

37 PSO Comparison With EC No selection operation in PSO
All particles in PSO are kept as members of the population through the course of the run PSO is the only algorithm (population based Heuristic search) that does not implement the survival of the fittest operator No crossover operator in PSO The PSO update formulae resembles mutation in EP (Evolutionary Programming) In EP, the balance between the global and local search can be adjusted through a number of parameters, whilst in PSO the balance is achieved through the inertial weight factor () Ant Colony Optimisation and Particle Swarm Optimisation

38 Next Lecture We will be talking about:
Bin packing Data clustering The laboratory will involve looking at an number of simulations of ACO and PSO Not assessed but useful revision! Ant Colony Optimisation and Particle Swarm Optimisation


Download ppt "Algorithms and their Applications CS2004 ( )"

Similar presentations


Ads by Google