Presentation is loading. Please wait.

Presentation is loading. Please wait.

G5BAIM Artificial Intelligence Methods Graham Kendall Ant Algorithms.

Similar presentations


Presentation on theme: "G5BAIM Artificial Intelligence Methods Graham Kendall Ant Algorithms."— Presentation transcript:

1 G5BAIM Artificial Intelligence Methods Graham Kendall Ant Algorithms

2 Ahhhhh!!! Finally. Ant Algorithms. G5BAIM Genetic Algorithms © Guy Theraulaz So that’s why we’ve been getting pictures of ants all this time!!!!

3 G5BAIM Ant Algorithms Ant Algorithms Ants are practically blind but they still manage to find their way to and from food. How do they do it? These observations inspired a new type of algorithm called ant algorithms (or ant systems) These algorithms are very new (Dorigo, 1996) and is still very much a research area

4 G5BAIM Ant Algorithms Ant Algorithms Ant systems are a population based approach. In this respect it is similar to genetic algorithms There is a population of ants, with each ant finding a solution and then communicating with the other ants

5 G5BAIM Ant Algorithms Ant Algorithms A B C H D F E G

6 G5BAIM Ant Algorithms Ant Algorithms A B C D F E d=0.5 d=1

7 G5BAIM Ant Algorithms Ant Algorithms Time, t, is discrete At each time unit an ant moves a distance, d, of 1 Once an ant has moved it lays down 1 unit of pheromone At t=0, there is no pheromone on any edge

8 G5BAIM Ant Algorithms Ant Algorithms At t=1 there will be 16 ants at B and 16 ants at D. At t=2 there will be 8 ants at D and 8 ants at B. There will be 16 ants at E The intensities on the edges will be as follows FD = 16, AB = 16, BE = 8, ED = 8, BC = 16 and CD = 16 A B C D F E 0.5 1 1 1 1 16 ants are moving from A - F and another 16 are moving from F - A

9 G5BAIM Ant Algorithms Ant Algorithms We are interested in exploring the search space, rather than simply plotting a route We need to allow the ants to explore paths and follow the best paths with some probability in proportion to the intensity of the pheromone trail We do not want them simply to follow the route with the highest amount of pheromone on it, else our search will quickly settle on a sub-optimal (and probably very sub-optimal) solution

10 G5BAIM Ant Algorithms Ant Algorithms The probability of an ant following a certain route is a function, not only of the pheromone intensity but also a function of what the ant can see (visibility) The pheromone trail must not build unbounded. Therefore, we need “evaporation”

11 G5BAIM Ant Algorithms Ant Algorithms and the TSP At the start of the algorithm one ant is placed in each city Variations have been tested by Dorigo

12 G5BAIM Ant Algorithms Ant Algorithms and the TSP Time, t, is discrete. t(0) marks the start of the algorithm. At t+1 every ant will have moved to a new city Assuming that the TSP is being represented as a fully connected graph, each edge has an intensity of trail on it. This represents the pheromone trail laid by the ants Let T i,j (t) represent the intensity of trail edge (i,j) at time t

13 G5BAIM Ant Algorithms Ant Algorithms and the TSP When an ant decides which town to move to next, it does so with a probability that is based on the distance to that city and the amount of trail intensity on the connecting edge The distance to the next town, is known as the visibility, n ij, and is defined as 1/d ij, where, d, is the distance between cities i and j.

14 G5BAIM Ant Algorithms Ant Algorithms and the TSP At each time unit evaporation takes place The amount of evaporation, p, is a value between 0 and 1

15 G5BAIM Ant Algorithms Ant Algorithms and the TSP In order to stop ants visiting the same city in the same tour a data structure, Tabu, is maintained This stops ants visiting cities they have previously visited Tabu k is defined as the list for the k th ant and it holds the cities that have already been visited

16 G5BAIM Ant Algorithms Ant Algorithms and the TSP After each ant tour the trail intensity on each edge is updated using the following formula T ij (t + n) = p. T ij (t) + ΔT ij Q is a constant and L k is the tour length of the k th ant

17 G5BAIM Ant Algorithms Ant Algorithms and the TSP Transition Probability where  and  are control parameters that control the relative importance of trail versus visibility

18 G5BAIM Ant Algorithms Ant Algorithms If you are interested (and willing to do some work) there is a spreadsheet on the web site that implements some of the above formula The spreadsheet was developed by myself simply as means of being able to cross check values whilst I developed an ant algorithm

19 G5BAIM Ant Algorithms Ant Algorithms - Applications Travelling Salesman Problem (TSP) Facility Layout Problem - which can be shown to be a Quadratic Assignment Problem (QAP) Vehicle Routing Stock Cutting (at Nottingham)

20 G5BAIM Ant Algorithms Ant Algorithms - Applications Marco Dorigo, who did the seminal work on ant algorithms, maintains a WWW page devoted to this subject http://iridia.ulb.ac.be/~mdorigo/ACO/ACO.html This site contains information about ant algorithms as well as links to the main papers published on the subject.

21 G5BAIM Artificial Intelligence Methods Graham Kendall End of Ant Algorithms


Download ppt "G5BAIM Artificial Intelligence Methods Graham Kendall Ant Algorithms."

Similar presentations


Ads by Google