0% found this document useful (0 votes)
8 views4 pages

Ants

The document discusses nature-inspired metaheuristics for optimization problems, including ant colony optimization. It provides details on how ant colony optimization algorithms are inspired by ants finding the shortest path between their nest and food source, and how this behavior is modeled into an algorithm to solve optimization problems like the traveling salesman problem.

Uploaded by

iramakbar21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

Ants

The document discusses nature-inspired metaheuristics for optimization problems, including ant colony optimization. It provides details on how ant colony optimization algorithms are inspired by ants finding the shortest path between their nest and food source, and how this behavior is modeled into an algorithm to solve optimization problems like the traveling salesman problem.

Uploaded by

iramakbar21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

2.

7 Other Nature-Inspired Meta-Heuristics

an (1 + 1)-EA is not the resulting runtime bound on its own. Significant are
the underlying techniques that can be generalized to analyze EAs in different
and more general situations. In [STW04], EAs for sorting are presented. The
authors study different objective functions and mutation operators for the
respective problem. The resulting runtime bounds for sorting n elements
with an EA range from Θ(n2 · log(n)) to an in n exponentially increasing
lower bound, depending on the exact choice of the objective function mea-
suring the “sortedness” of unsorted sequences and the choice of the mutation
operator.
Further examples for combinatorial optimization problems, which can be
solved with an EA within certain, formally proved time bounds, are the single
source shortest path (SSSP) problem ([STW04]), the maximum matching
(MM) problem ([GW03]) and the minimum spanning tree (MST) problem
([NW08]).
In [Jäg03], one can find an attempt to analyze (1 + 1)-EAs for continuous
objective functions RD → R. The author presents a version of the (1 + 1)-EA
with an adapted mutation operator, where, roughly speaking, the variance
of the mutation is altered depending on the success of the algorithm. For
functions that behave like the Euclidean distance to some point o ∈ RD , i. e.,
for functions f satisfying

|x − o| < |y − o| ⇒ f(x) < f(y),

the author proves that the time for halving the distance between the indi-
vidual and the global minimum o is linear in D.

2.7.2 Ant Algorithms

Ant algorithms are inspired by the famous double bridge experiment of Goss
et al. ([GADP89]). A colony of Argentine ants was set into an artificial envi-
ronment consisting of their nest and a food source which could be arrived via
two different ways with different lengths. The situation is shown in Figure
2.10. In the beginning, the ants randomly decide for one of the two paths
since the colony has no information obtained yet. While moving along the
path, each ant emits pheromones, marking the path it has chosen. The ants
that have decided for the shorter path arrive at the food source first and most
likely take the same way back to the nest because until the other group also
arrives at the food source, the pheromones are only on the shorter path.

45
2. Particle Swarm Optimization: State of the Art

When the ants that decided for the longer path finally arrive at the food
source, they sense a higher concentration of pheromones on the shorter path
than on the longer path because the shorter path is already traversed and
marked twice. As more time passes and the ants go several rounds to the
food source and back, the intensity difference between the pheromone val-
ues on the two ways further increases and the shorter path becomes more
and more attractive. In the end, only very few ants use the longer way while
the vast majority prefers the shorter path.

Food Food
Nest Nest
Source Source

(a) At the beginning: Ants moving along (b) After some time: Most ants moving
one of the two paths. along the shorter path.

Figure 2.10: The double bridge experiment.

This capability of ants to find the shortest way to the food source has been
modeled in order to create an optimization algorithm for the TSP ([DG97]).
The resulting ant algorithm works as follows. Every edge {i, j} of the input
graph G is assigned a pheromone value τi,j , which is initialized with some
positive value. The pheromone values represent the memory of the colony.
High pheromone values indicate a high probability for the ants to select the
respective edge again. Additionally, every edge {i, j} has a certain visibility
ηi,j , also called heuristic information, a value that determines how attractive
an edge is for the ants, without taking pheromones into account. A typical
choice is ηi,j = 1/di,j , where di,j is the length of edge {i, j}.

Then, until some termination criterion holds, the following simulation


of ants’ behavior is repeated: The colony of N ants is placed on the nodes
of the graph, e. g., all the ants can be placed on the same node or a different
node could be selected randomly for every ant. The variable πk describes the
partial tour that ant k has already traveled. At the beginning of the tour, πk
contains only the starting node of ant k. As long as the tour is not complete,

46
2.7 Other Nature-Inspired Meta-Heuristics

every ant k selects its next node randomly. If the current node of ant k is
(k)
node i, then it moves to node j with probability pi,j , defined as

α β
⎨ ' (τi,j ) · (ηi,j )

if j ∈
/ πk
(k) α β
pi,j := / k (τi,s ) · (ηi,s )
s∈π (2.12)

⎩0 otherwise,

where α and β are positive constants controlling the influence of τ and η.


Typical choices are α = 1 and β = 2 ([DG97]). When the ants have com-

Algorithm 3: Ant algorithm


input : complete graph G = (V, E) with n nodes and edge weights di,j
for {i, j} ∈ E
output: ordering π of the nodes of G
1 for {i, j} ∈ E do
2 Initialize τi,j ; // initialize pheromone values
3 Calculate ηi,j ; // calculate heuristic information
4 repeat
5 for k = 1 → N do
6 Initialize πk ; // initialize ants’ tours
7 for ℓ = 2 → n do
8 for k = 1 → N do
9 Set i := πk (ℓ − 1);
(k)
10 Choose j ∈ V with probability pi,j as defined in Equation
(2.12);
11 Set πk (ℓ) := j;

12 Update τ according to Equation (2.13);


13 until Termination criterion holds;
14 return Best πk ;

pleted their tour, the pheromone values are updates via the equation

τi,j := ρ · τi,j + ∆τi,j , (2.13)

where ρ ∈ (0, 1) is the pheromone decay parameter, describing how much


of the pheromone vanishes during one tour of the ants. The value ∆τi,j de-

47
2. Particle Swarm Optimization: State of the Art

scribes, by how much the pheromone value of edge {i, j} is increased by ants
moving over it. One example for a concrete choice of ∆τi,j is ([DG97])
N
( (k)
∆τi,j = ∆τi,j
k=1

with )
(k) 1/L(k) if edge {i, j} is traversed by ant k,
∆τi,j =
0 otherwise,

where L(k) is the length of ant k’s tour. When the termination criterion holds,
the algorithm is stopped and the best tour visited by any ant is returned.
An algorithmic overview over the ant algorithm can be found in Algo-
rithm 3. For an overview over variants of the ant algorithm for binary prob-
lems, including some theoretical runtime results, see [NSW09].

48

You might also like