Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Swarm Intelligence Summer 2023

• S(I) for I ∈ D: the set of admissible solutions w.r.t. input I.

• The objective or measure function f : S(I) → IN̸=0 .

• goal ∈ {min, max}.

What we are looking for, is, for I ∈ D, an admissible solution σopt ∈ S(I) such that

f (σopt ) = goal{f (σ) | σ ∈ S(I)} .

f (σ) is the value of the admissible solution σ. For short, we write OPT(I) = f (σopt ) for the value of an
optimal solution.

In this chapter, we consider admissible solutions σ that consist of a finite sequence X1 , X2 , . . . of components
where each component might have its own range D1 , D2 , . . . of values which may depend on (current)
assignments of values to the other components. Every ant has a (partial) admissible solution, and the goal of
the ants is to construct complete admissible solutions.
If in iteration t the immediately preceding assignment processed the variable Xi , the ant chooses a free
variable Xj to be processed in the next iteration. The choice of j is governed by the concentration of the
pheromones τi.j (t). When j has been chosen, the pheromone concentration will be updated by every ant that
“goes” from i to j.
An assignment of a value vij ∈ Di to a variable Xi we call a solving component cji . The goal, therefore, is
for the ants to combine matching solution components to construct good and admissible solutions. The set of
all solution components, i. e., all possible variable assignments, is denoted by C in the following.
Each solution component cji is assigned a pheromone value τij , which indicates the “attractiveness” of the
solution component, i. e., the higher this pheromone value is, the more likely it is that this solution component
will be selected in the construction of an overall solution. Since the pheromone values change during the
algorithm, these values are functions of the iteration number t, so we write τij (t).

Algorithmus 4 Ant Colony Optimization (ACO)


input: Π : combinatorial optimization problem.
output: σ ∗ : best solution found
initialization
repeat
Generate candidate solutions by ants
Apply local search to improve solutions {optional}
Update pheromone values
if better solution than σ ∗ found then
σ ∗ := new best solution
end if
until termination criterion met

The general scheme for ant algorithms is shown in Algorithm 4. The algorithm consists mainly of the following
steps:

• Initialization: Here especially the pheromone values are initialized to values τij (0), which are param-
eters of the algorithm to be chosen.

17
Swarm Intelligence Summer 2023

• Generate solutions by ants: In this step, N ants independently construct solutions to the optimization
problem. Each ant p starts with an “empty” partial solution sp = ∅, which is extended step by step
until a total solution is generated. In each step, for going from i to j, the ant p selects only permissible
extensions cji ∈ N (sp ), where N (sp ) denotes the set of solution components that may be added to
the partial solution sp without violating the permissibility of the solution.
If the current partial solution sp cannot be extended without violating the permissibility, i. e., if N (sp ) =
∅, it depends on the respective construction mechanism how to proceed in this case. One possibility
is to reject this solution. Another possibility is to construct a complete, but invalid solution, but to
“punish” it later, so as not to let the search run in that direction again.

The decision which extension the set of admissible extensions N (sp ) is actually added to the current

partial solution in one step is made probabilistically. The most widely used rule for determining

probabilities is:

τij (t)α · [η(cji )]β



if cji ∈ N (sp)


⎨ %

j τix(t)α · [η(cxi)]β
Pr(ci |sp; t) =

⎪ cxi ∈N (sp )

0 otherwise

Here, η denotes a function which – if present – provides heuristic information of an extension.


The parameters α and β control the influence of pheromone values and heuristic information, respec-
tively. For α = 0 the heuristic information is the only influence, i. e., the method degenerates to a
stochastic Greedy-algorithm. For β = 0, on the other hand, the heuristic information is ignored and
the pheromone values alone determine the probability of choosing an extension.
A possible addition of this approach is to first cast a number r ∈ [0, 1] and then, depending on
a predefined threshold Q ∈ [0, 1], either use p(cji |sp ; t) as defined above, or choose any permissible
extension (i. e., temporarily ignoring pheromone values and heuristic information). This leads to a higher
exploration of the search space.

• Apply local search to improve solutions: Once complete solution candidates have been constructed
by the ants, local search techniques can optionally be applied to improve these solution candidates if
necessary. ACO algorithms achieve the best performance when coupled with such search procedures.

• Update pheromone values: The goal of updating the pheromone values is to steer the search in
subsequent iterations in the direction of those solution extensions that belong to good solutions. The
updating of pheromone values consists of two mechanisms:
– The emission of new pheromones: this involves selecting the best of the candidate solutions found
so far, and “rewarding” their solution extensions with pheromones.
– The (partial) “evaporation” of old pheromones: this is necessary to avoid early convergence towards
suboptimal solutions. As a result, the ants “forget” a more distant past, which leads to searching
new regions of the search space as well.

18
Swarm Intelligence Summer 2023

&
⟨p⟩ Q1 if ant p goes from i to j between t and t + 1
• Ant Density: gij (t, t + 1) =
0 otherwise

⎨ Q2

⟨p⟩ if ant p goes from i to j between t and t + 1
• Ant Quantity: gij (t, t + 1) = dist(i, j)
0 otherwise


⎨ Q3 if ant p goes from i to j between t and t + 1
⟨p⟩
• Ant Cycle: gij (t, t + 1) = L⟨p⟩
⎩0 otherwise
Here, L⟨p⟩ is the length of ant p’s best tour so far.

20

You might also like