Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Ant Algorithms
Gabriel NEGARĂ
ngabi@infoiasi.ro
ngabi@infoiasi.ro
- food
- medicine
- etc.
- COMPUTER SCIENCE
Web resources
n Dorigo home page:
http://iridia.ulb.ac.be/~mdorigo/HomePageDorigo/
n AntColony.org
http://www.antcolony.org/
About ACO
n Ant Colony Optimization (ACO) studies artificial
systems that take inspiration from the behavior of real
ant colonies and which are used to solve discrete
optimization problems.
n ACO special track at GECCO-2001 San Francisco, USA, July 7-11, 2001
n PARALLEL IMPLEMENTATIONS
ASYMMETRIC TSP
!
8th DIMACS Implementation Challenge:
The Traveling Salesman Problem
SOP
n Definition
The Sequential Ordering Problem (SOP) with precedence
constraints consists of finding a minimum weight Hamiltonian
path on a directed graph with weights on the arcs and on the
nodes, subject to precedence constraints among nodes.
SOP can also be formulated as a general case of the
asymmetric traveling salesman problem (ATSP). In this
representation cij is an arc weight (where cij may be different
from cji) which can either represent the cost of arc (i, j) when
cij>=0, or an ordering constraint when cij=-1
(cij=-1 means that element j must precede, not necessarily
immediately, element i).
QUADRATIC ASSIGNMENT
PROBLEM
n The quadratic assignment problem (QAP) is one of
fundamental combinatorial optimization problems in the
branch of optimization or operations research in mathematics,
from the category of the facilities location problems.
- ACO meta-heuristics
- collaborative systems, based on feedback
- ant algorithms
- parallel, adaptable, probabilistic algorithms
ACO Meta-heuristics
Components:
n local components
- ants generation
- ants activity
- pheromone vaporisation
n global components
- daemon actions
Travelling Salesman Problem (TSP)
Step 1:
- pheromone traces have equal values for every edge
- place ants in graph’s nodes
Step 2:
locate start-up node (city) of every ant on first position in tabu list
Step 3:
repeat, for every ant, until tabu list is full
- move ant from current node to a neighbour node, chosen with probability
depending on trace’s value and on weight of edge between the two nodes -/
- put chosen node in ant’s tabu list
Travelling Salesman Problem (TSP)
Step 4:
foreach ant
- compute tour length described by the ant
- modify the optimal value found (in case of a better value)
- add pheromone on tour’s edges, depending of his length
Step 5:
- increment number of iterations (NC)
Travelling Salesman Problem (TSP)
Step 6:
- if (maximum iterations number is not reached) and
(there is no stagnation behaviour)
then
empty tabu lists
go to step 2
else
print best solution found
end algorithm
Complexity: O(nd)
n: number of edges
d: graph diameter
Graph coloring problem (GCP)
Description:
Entities:
begin
· ant a picks the common, global matrix A
· foreach (vertex i in V ) (i)
· let S1, S2, ..., Sj be the current coloring sets (ii)
· determine feasible coloring sets for i: Si1, Si2, ..., Sik (iii)
· if (there are no feasible sets for i)
· add i to a new set, Sj+1, as first element of the set (iv)
· else
· foreach (set S in Si1, Si2, ..., Sik)
· compute score for S: sum(ait), foreach t in S
· end foreach
· randomly choose S’ from best scored sets (v)
· add i to S’
· endif
· end foreach
end
EAC - Coloring specific methods
2. Experience based dsatur coloring
begin
· ant a picks the common, global matrix A
· while (coloring is not completed) (i)
· choose a non-colored vertex i based on a dsatur criteria (ii)
· let S1, S2, ..., Sj be the current coloring sets
· determine feasible coloring sets for i: Si1, Si2, ..., Sik
· if (there are no feasible sets for i)
· add i to a new set, Sj+1, as first element of the set
· else
· foreach (set S in Si1, Si2, ..., Sik)
· compute score for S: sum(ait), foreach t in S
· endforeach
· randomly choose S’ from best scored sets
· add i to S’
· endif
· end while
end
cEAC – contracting EAC
in a separate thread...