Outline DM63 HEURISTICS FOR COMBINATORIAL OPTIMIZATION Ant Colony Optimization: the Metaheuristic Application Examples Generalized Assignment Problem (GAP) Lecture 11 Connection between ACO and other Metaheuristics Encodings Ant Colony Optimization Capacited Vehicle Routing Linear Ordering Exercises Marco Chiarandini DM63 – Heuristics for Combinatorial Optimization Problems 2 Ant Colony Optimization Metaheuristic Note: ◮ In each cycle, each ant creates one candidate solution ◮ Population-based method in which artificial ants iteratively construct using a constructive search procedure . candidate solutions. ◮ Ants build solutions by performing randomized walks on a construction ◮ Solution construction is probabilistically biased by graph G = ( V, E ) where V are solution components and G is fully pheromone trail information, heuristic information and connected. partial candidate solution of each ant (memory). ◮ Pheromone trails are modified during the search process ◮ All pheromone trails are initialized to the same value, τ 0 . to reflect collective experience. ◮ Pheromone update typically comprises uniform decrease of all trail levels ( evaporation ) and increase of some trail levels Ant Colony Optimization (ACO): based on candidate solutions obtained from construction + perturbative initialize pheromone trails search. While termination criterion is not satisfied: ◮ Subsidiary perturbative search is (often) applied to individual candidate | | generate population sp of candidate solutions | using subsidiary randomized constructive search | solutions. | || | perform subsidiary perturbative search on sp ◮ Termination criterion can include conditions on make-up of current | | ⌊ update pheromone trails based on sp population, e.g. , variation in solution quality or distance between individual candidate solutions. DM63 – Heuristics for Combinatorial Optimization Problems 3 Example: A simple ACO algorithm for the TSP (2) Example: A simple ACO algorithm for the TSP (1) ◮ Search space and solution set as usual (all Hamiltonian cycles in given ◮ Subsidiary perturbative search: Perform iterative improvement graph G ). based on standard 2-exchange neighborhood on each ◮ Associate pheromone trails τ ij with each edge ( i, j ) in G . candidate solution in population (until local minimum is reached). ◮ Use heuristic values η ij := 1 ◮ Update pheromone trail levels according to c ij � ◮ Initialize all weights to a small value τ 0 ( τ 0 = 1 ). τ ij := ( 1 − ρ ) · τ ij + ∆ ij ( s ) s ∈ sp ′ ◮ Constructive search: Each ant starts with randomly chosen vertex and iteratively extends partial round trip π k by selecting where ∆ ij ( s ) := 1/C s vertex not contained in π k with probability if edge ( i, j ) is contained in the cycle represented by s ′ , and 0 otherwise. [ τ ij ] α · [ η ij ] β Motivation: Edges belonging to highest-quality candidate solutions p ij = � and/or that have been used by many ants should be preferably used in [ τ il ] α · [ η il ] β subsequent constructions. l ∈N k i ◮ Termination: After fixed number of cycles α and β are parameters. (= construction + perturbative search phases). DM63 – Heuristics for Combinatorial Optimization Problems 5 ACO Variants Ant System on TSP ◮ Initialization: m ◮ Ant System AS (Dorigo et al., 1991) τ ij = τ o = C NN ◮ Elitist AS (EAS)(Dorigo et al., 1991; 1996) Motivation: sligthly more than what evaporates ◮ The iteration best solution adds more pheromone ◮ Construction: m ants in m randomly chosen cities ◮ Rank-Based AS (ASrank)(Bullnheimer et al., 1997; 1999) ◮ Only best ranked ants can add pheromone [ τ ij ] α · [ η ij ] β ◮ Pheromone added is proportional to rank p ij = α and β parameters [ τ il ] α · [ η il ] β , � ◮ Max-Min AS (MMAS)(St¨ utzle & Hoos, 1997) l ∈N k i ◮ Update ◮ Ant Colony System (ACS) (Gambardella & Dorigo, 1996; Dorigo & Gambardella, 1997) τ ij ← ( 1 − ρ ) · τ ij to all the edges ◮ Approximate Nondeterministic Tree Search ANTS (Maniezzo 1999) m � ◮ Hypercube AS (Blum, Roli and Dorigo, 2001) ∆ k 1 to the edges visited by the ants, ∆ k τ ij ← τ ij + ij = ij C k k = 1 DM63 – Heuristics for Combinatorial Optimization Problems 7 DM63 – Heuristics for Combinatorial Optimization Problems 8
Elitist Ant System on TSP Rank-based Ant System on TSP ◮ Update: only w − 1 best ranked ants + the best-so-far solution deposit ◮ Update pheromone: τ ij ← ( 1 − ρ ) · τ ij to all the edges τ ij ← ( 1 − ρ ) · τ ij to all the edges m w − 1 � � ∆ k ij + e · ∆ bs τ ij ← τ ij + to the edges visited by the ants ∆ k ij + w · ∆ bs τ ij ← τ ij + to the edges visited by the ants ij ij k = 1 k = 1 � 1 ij = 1 ( ij ) in tour k , bs best-so-far ∆ k ∆ bs C bs ij = C k otherwise 0 1 ∆ bs ij = C bs DM63 – Heuristics for Combinatorial Optimization Problems 9 DM63 – Heuristics for Combinatorial Optimization Problems 10 MAX − MIN Ant System (MMAS) Ant Colony System (ACS) on the TSP Three main ideas: Peculiarities in pheromone management: ◮ Different state transition rule ◮ Update i { τ il η β if q ≤ q 0 arg max l ∈ N k il } τ ij ← ( 1 − ρ ) · τ ij to all the edges [ τ ij ] α · [ η ij ] β j = τ ij ← τ ij + ∆ bs p ij = otherwise only to the edges visited by the best ant � [ τ il ] α · [ η il ] β ij l ∈N k i Meaning of best alternates during the search between: ◮ Global pheromone update ◮ best-so-far ◮ iteration best τ ij ← ( 1 − ρ ) · τ ij + ρ∆ bs ij ( s ) ◮ bounded values τ min and τ max to only ( ij ) in best-so-far tour (O(n) complexity) ρC ∗ and τ min = τ max ◮ τ max = 1 a ◮ Local pheromone update: happens during tour construction to avoid ◮ Reinitialization of τ if: other ants to make the same choices: ◮ stagnation occurs 1 ◮ idle iterations τ ij ← ( 1 − ǫ ) · τ ij + ǫτ 0 ǫ = 0.1, τ 0 = nC NN Results obtained are better than AS, EAS, and ASrank, and of similar quality to ACS’s Parallel construction preferred to sequential construction DM63 – Heuristics for Combinatorial Optimization Problems 11 DM63 – Heuristics for Combinatorial Optimization Problems 12 Approximate Nondeterministic Tree Search on TSP Strongly Invariant ACO on TSP Considers instances which are equivalent up to a linear transformation of units. ◮ Use of lower bound to compute heuristic value The siACO is an algorithm that enjoy the property of that its internal state at ◮ Add an arc to the current partial solution and estimate LB of complete each iteration is the same on equivalent instances. solution ◮ Different solution construction rule For AS: ◮ Use heuristic values η ij := C NN n · c ij ατ ij + ( 1 − α ) η ij p k ij = � ◮ Update according to ατ il + ( 1 − α ) η il l ∈ N k � i τ ij := ( 1 − ρ ) · τ ij + ∆ ij ( s ) ◮ Different pheromone trail update rule s ∈ sp ′ k � � C k − LB if ( ij ) in belongs to T k ∆ k θ ( 1 − where ∆ ij ( s ) := C NN τ ij ← τ ij + ∆ k L avg − LB ij ij = m · C s otherwise if edge ( i, j ) is contained in the cycle represented by s ′ , and 0 otherwise. i = 1 0 Can be extended to other ACO versions and to other problems: QAP and Scheduling DM63 – Heuristics for Combinatorial Optimization Problems 13 DM63 – Heuristics for Combinatorial Optimization Problems 14 Analysis Pheromone development Other things to check ◮ Synergy ◮ Pheromone Development ◮ Strength of local search (exploitation vs exploration) ◮ Heuristic Information (linked to parameter β ) Results show that with β = 0 local search can still be enough ◮ Lamarkian vs Darwinian Pheromone Updates ◮ Run Time impact DM63 – Heuristics for Combinatorial Optimization Problems 16
Recommend
More recommend