the aco metaheuristic

13
The ACO Metaheuristic The ACO Metaheuristic ACO 2.1 - 2.3 ACO 2.1 - 2.3 January 2008 January 2008 C. Colson C. Colson

Upload: savannah-gomez

Post on 02-Jan-2016

30 views

Category:

Documents


0 download

DESCRIPTION

The ACO Metaheuristic. ACO 2.1 - 2.3 January 2008 C. Colson. Ants in Mythology. Zeus turned the hardworking ants of the uninhabited island of Aegina into the subjects of Aeacus. The people were called the Myrmidons. Pēleús (son of Aeacus) was the father of Achilles - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The ACO Metaheuristic

The ACO MetaheuristicThe ACO Metaheuristic

ACO 2.1 - 2.3ACO 2.1 - 2.3

January 2008January 2008

C. ColsonC. Colson

Page 2: The ACO Metaheuristic

Ants in MythologyAnts in Mythology Zeus turned the hardworking ants of the uninhabited island of Zeus turned the hardworking ants of the uninhabited island of

Aegina into the subjects of Aeacus. The people were called the Aegina into the subjects of Aeacus. The people were called the Myrmidons. Myrmidons.

Pēleús (son of Aeacus) was the father of AchillesPēleús (son of Aeacus) was the father of Achilles Although Achilles was from Thessaly, he leads his distant Although Achilles was from Thessaly, he leads his distant

kinsmen, the Myrmidons in the Trojan War as told by Homer in kinsmen, the Myrmidons in the Trojan War as told by Homer in the the IliadIliad..

Of the Myrmidons: “Industry, thrift, endurance; they are eager Of the Myrmidons: “Industry, thrift, endurance; they are eager for gain, and never easily relinquish, what they have won!"for gain, and never easily relinquish, what they have won!"

Page 3: The ACO Metaheuristic

Metaheuristic?Metaheuristic? Refers to a master strategy that modifies sub-heuristics.Refers to a master strategy that modifies sub-heuristics. A general purpose heuristic designed to guide an underlying A general purpose heuristic designed to guide an underlying

problem-specific heuristic towards promising solutions.problem-specific heuristic towards promising solutions.

NPNP-hard problems are believed to be unsolvable in -hard problems are believed to be unsolvable in polynomial time (polynomial time (tractabletractable and and intractableintractable problems). problems).

As a result, heuristic methods are applied to get near-As a result, heuristic methods are applied to get near-optimal results in a reasonable time.optimal results in a reasonable time.

Metaheuristics have entered the picture to guide Metaheuristics have entered the picture to guide “heuristic methods” applicable to widely varying “heuristic methods” applicable to widely varying problems. problems.

ACOACO is a metaheuristic framework: is a metaheuristic framework: applicable to many different applications.applicable to many different applications.

Page 4: The ACO Metaheuristic

Combinational OptimizationCombinational Optimization Involve finding values for discrete variables such that an optimal solution Involve finding values for discrete variables such that an optimal solution

with respect to a given objective function is found.with respect to a given objective function is found.– Traveling salesmanTraveling salesman– Supply-chain logistics planningSupply-chain logistics planning– Asset allocationAsset allocation

Maximize or Minimize applications: Maximize or Minimize applications: ПП((S, f, S, f, ΩΩ))

ProblemProblem: general question to be answered: general question to be answered InstanceInstance: a case of specified values for a problem: a case of specified values for a problem

S:S: set of candidate solutions set of candidate solutions f(s): f(s): objective function (s objective function (s ЄЄ S) S) ΩΩ: constraints: constraints Feasible solutions: Ŝ subset of S, that satisfies Feasible solutions: Ŝ subset of S, that satisfies ΩΩ Globally optimal solution: s* Globally optimal solution: s* ЄЄ Ŝ Ŝ

Minimization example: f(s*) ≤ f(s) for all {s Minimization example: f(s*) ≤ f(s) for all {s ЄЄ Ŝ} Ŝ} Maximization example: f(s*) ≥ f(s) for all {s Maximization example: f(s*) ≥ f(s) for all {s ЄЄ Ŝ} Ŝ}

Page 5: The ACO Metaheuristic

Computational ComplexityComputational Complexity Straight-forward approach to solution: exhaustive search!Straight-forward approach to solution: exhaustive search!

– The possible solutions grows exponentially with instance size (n).The possible solutions grows exponentially with instance size (n).

Time complexity: maximum time an algorithm needs to find Time complexity: maximum time an algorithm needs to find aa solution to an instance of n-size (aka worst-time complexity).solution to an instance of n-size (aka worst-time complexity).

““Big-O” formal notation: Big-O” formal notation: Ŏ(function)Ŏ(function) A function g(n) is said to be Ŏ( h(n) ), if two positive A function g(n) is said to be Ŏ( h(n) ), if two positive

constants A and nconstants A and n00 exist such that g(n) ≤ Ah(n) for all n≥n exist such that g(n) ≤ Ah(n) for all n≥n00 . . This is the asymptotic upper bound.This is the asymptotic upper bound.

Polynomial time complexPolynomial time complex: if Ŏ( g(n) ) where g(n) is a : if Ŏ( g(n) ) where g(n) is a polynomial. If k is the largest exponent of the polynomial polynomial. If k is the largest exponent of the polynomial g(n), then the problem is said to be solvable in Ŏ( ng(n), then the problem is said to be solvable in Ŏ( nkk ) time. ) time.

Exponential time complexExponential time complex: if Ŏ( g(n) ) cannot be bounded by : if Ŏ( g(n) ) cannot be bounded by a polynomial.a polynomial.

Intractable = not polynomial time complex. Intractable = not polynomial time complex.

Page 6: The ACO Metaheuristic

NPNP-Completeness -Completeness (Bottom of page 28)(Bottom of page 28)

PP-class: an algorithm that outputs the correct answer (“yes” -class: an algorithm that outputs the correct answer (“yes” or “no) in poly-time.or “no) in poly-time.

NPNP-class (stands for Non-deterministic Polynomial): an -class (stands for Non-deterministic Polynomial): an algorithm that verifies every instance is indeed “yes” in poly-algorithm that verifies every instance is indeed “yes” in poly-time.time.

P is a subset of NPP is a subset of NP

Poly-time reductions: the transformation of one problem into Poly-time reductions: the transformation of one problem into another one by a poly-time algorithm.another one by a poly-time algorithm.

Key point: if the resultant problem is solvable in poly-time, Key point: if the resultant problem is solvable in poly-time, then the original problem is likewise solvable in poly-time! then the original problem is likewise solvable in poly-time!

NP Problems

P Problems

NP-complete Problems

P = NP-complete ???

NP-hard???

Page 7: The ACO Metaheuristic

Two more classifications of algorithms:Two more classifications of algorithms: ExactExact : :

– guaranteed to find optimal solutionguaranteed to find optimal solution– prove optimality for every (finite-size) instanceprove optimality for every (finite-size) instance– runs within instance-dependent time (worst case scenario: runs within instance-dependent time (worst case scenario:

exponential-time)exponential-time)

ApproximateApproximate (trades optimality for speed/efficiency) heuristic (trades optimality for speed/efficiency) heuristic methods; seeks near-optimal solutions but cannot guarantee methods; seeks near-optimal solutions but cannot guarantee optimality.optimality.– Further classified into constructive and local searchesFurther classified into constructive and local searches– Constructive (iteratively add solution components to the empty Constructive (iteratively add solution components to the empty

solution set until solution set is found): incremental solutions without solution set until solution set is found): incremental solutions without backtracking (see NNH for TSP problem on pg. 30)backtracking (see NNH for TSP problem on pg. 30)

– Local search (starts from a full solution set and tries to make Local search (starts from a full solution set and tries to make improvements by local changes): iterative exploration that seeks to improvements by local changes): iterative exploration that seeks to improve the solution with local changes (see best-improvement rule improve the solution with local changes (see best-improvement rule for neighborhood examination scheme on pg. 31)for neighborhood examination scheme on pg. 31)

– Neighborhood structureNeighborhood structure: the set of possible solutions that the : the set of possible solutions that the algorithm can “move” to from the current solution.algorithm can “move” to from the current solution.

Page 8: The ACO Metaheuristic

The ACO MetaheuristicThe ACO Metaheuristic

A colony of artificial ants A colony of artificial ants cooperatecooperate to find good to find good solutions to difficult discrete optimization problems. solutions to difficult discrete optimization problems.

Good solutions are an Good solutions are an emergent propertyemergent property of of cooperation!cooperation!

Static problems: all characteristics of the problem Static problems: all characteristics of the problem are defined once and do not change.are defined once and do not change.

Dynamic problems: characteristics vary according to Dynamic problems: characteristics vary according to underlying functions and the optimization must adapt underlying functions and the optimization must adapt to the changing environment.to the changing environment.

See problem definition on pgs. 34 & 35.See problem definition on pgs. 34 & 35.

Page 9: The ACO Metaheuristic

ACO (continued)…ACO (continued)…

Ants build solutions by performing stochasic action Ants build solutions by performing stochasic action on the on the construction graphconstruction graph which is made up of which is made up of components components (nodes) and (nodes) and connections connections (paths).(paths).

Sometimes the ants find feasible solutions, Sometimes the ants find feasible solutions, sometimes not (and that’s ok).sometimes not (and that’s ok).

The pheromone trail is coded long-term memory.The pheromone trail is coded long-term memory. Heuristic information: additional information that Heuristic information: additional information that

the ants have, the ants have, a prioria priori, from a source other than , from a source other than the environment (example: estimated path cost)the environment (example: estimated path cost)

Although ants act concurrently, independently, and Although ants act concurrently, independently, and most times dumbly, good–quality solutions arise most times dumbly, good–quality solutions arise from collective interaction of the ants. from collective interaction of the ants.

Page 10: The ACO Metaheuristic

ACO ComponentsACO Components ConstructAntsSolutions: ConstructAntsSolutions:

– manages ants concurrentlymanages ants concurrently– stochastic engine resides herestochastic engine resides here– evaluation function for ant performance resides hereevaluation function for ant performance resides here

UpdatePheromones: UpdatePheromones: – deposits or evaporates pheromone trails.deposits or evaporates pheromone trails.

DaemonActions:DaemonActions:– centralized actions not resident in individual antscentralized actions not resident in individual ants– optional functionalityoptional functionality– example: pheromone bonuses for shortest path yetexample: pheromone bonuses for shortest path yet

See page 38 for pseudocode.See page 38 for pseudocode.

Page 11: The ACO Metaheuristic

ACO ApplicationsACO Applications Hamiltonian circuit: a trip solution on an “undirected” graph Hamiltonian circuit: a trip solution on an “undirected” graph

which visits each city (node) exactly once and returns to which visits each city (node) exactly once and returns to the starting city.the starting city.

Symmetric TSP:Symmetric TSP:– only paths have “cost”only paths have “cost”– shortest Hamiltonian circuit trip lengthshortest Hamiltonian circuit trip length– ““cost” from node i to j is identical to j to i.cost” from node i to j is identical to j to i.

Asymmetric traveling salesman problemAsymmetric traveling salesman problem– ““cost” from node i to j is cost” from node i to j is notnot identical to j to i. identical to j to i.

Sequential Ordering Problem: similar to TSPSequential Ordering Problem: similar to TSP– an asymmetric traveling salesman problem with additional an asymmetric traveling salesman problem with additional

constraintsconstraints– doesn’t need to return to starting citydoesn’t need to return to starting city– a precedence constraint must be considered a precedence constraint must be considered – the precedence constraint requires that some node i has to be the precedence constraint requires that some node i has to be

visited before some other node jvisited before some other node j Note: Note: pheromones play roughly the same role in these cases.pheromones play roughly the same role in these cases.

Page 12: The ACO Metaheuristic

ACO Applications (continued…)ACO Applications (continued…) Generalized Assignment Problem: Generalized Assignment Problem:

– a number of agents and a number of tasksa number of agents and a number of tasks– any agent can be assigned to perform any task, but incurs some any agent can be assigned to perform any task, but incurs some

cost/profit that varies with the assignmentcost/profit that varies with the assignment– each agent has a budget and the sum of the costs of task assigned each agent has a budget and the sum of the costs of task assigned

(cannot exceed its budget). (cannot exceed its budget). – solution is an assignment in which all agents do not exceed their solution is an assignment in which all agents do not exceed their

budget budget – good solution minimizes cost or maximizes “profit”good solution minimizes cost or maximizes “profit”– pheromones associated with either the next task to choose or which pheromones associated with either the next task to choose or which

agent to assign the task to.agent to assign the task to.

Multiple Knapsack Problem: Multiple Knapsack Problem: – goal is to maximize valuable items that can fit into one bag to be goal is to maximize valuable items that can fit into one bag to be

carried on a tripcarried on a trip– given a set of items, each with a cost and a value, determine the given a set of items, each with a cost and a value, determine the

number of each item to include in a collection so that the total cost is number of each item to include in a collection so that the total cost is less than a given limit and the total value is as large as possibleless than a given limit and the total value is as large as possible

– pheromones are associated only with the desirability of adding a pheromones are associated only with the desirability of adding a particular item to a solutionparticular item to a solution

Page 13: The ACO Metaheuristic

ACO Applications (continued…)ACO Applications (continued…)

Network Routing Problem: Network Routing Problem: – minimum path costs between pairs of nodes in the minimum path costs between pairs of nodes in the

networknetwork– each “connection” (path) should have multiple each “connection” (path) should have multiple

pheromone trails associated for each different pheromone trails associated for each different node destination.node destination.

Dynamic TSP: Dynamic TSP: – time is a factortime is a factor– cities can be added or removed from the graphcities can be added or removed from the graph– pheromones act similarly to standard TSP pheromones act similarly to standard TSP

problem.problem.