• Keine Ergebnisse gefunden

A metaheuristic is a computational method that iteratively tries to improve an initial solution with respect to an evaluation function. Metaheuristics can cover a wide search space, but they do not guarantee to yield an optimal solution. They make little or no assumptions about the problem being solved so they can be applied to a given optimization problem with little or no modifications. Metaheuristics can be seen as a universal heuristic that guides a problem-specific heuristic towards areas of the search space containing better results. Examples of metaheuristics are tabu search (Glover, 1989, 1990), simulated annealing (Kirkpatrick et al., 1983) and ACO (Dorigo and Stützle, 2004).

ACO is a population-based metaheuristic inspired by nature that tries to reproduce features of collective intelligence shown by real ants. In a population-based algorithm, instances locally create changes and thereby influence the creation of global features that can be used to improve an initial solution. This allows us to solve complex distributed problems using simple local interactions without the need to create a global centralized system. The basic idea of self-organizing principles that allow highly coordinated behaviour of real ants can serve as inspiration for creating new algorithms whose parts cooperate in solving a problem.

ACO was inspired by the way ants cooperate within a colony. Most ant species have a poorly developed visual perceptive or are completely blind. Their communication is based on leaving ant produced chemical trails on the ground. These chemicals are calledpheromones. Each ant leaves a trail of pheromones behind him and he can sense pheromone trails left by other ants.

Pheromones fade over time by evaporating. If an ant uses a path that another ant used before him, the pheromones trail on this path will be reinforced with new pheromones each time it is used. With time, the most used path will have a dominant trail of pheromones on it and this will cause (almost) all ants to follow the dominant trail.

Double bridge experiment

An example of the described behaviour is demonstrated in a double bridge experiment performed by Deneubourg et al. (1990) and Goss et al. (1989) using a colony of the Argentine ant (I.

humilis). In this experiment, a double bridge is placed between a nest of ants and a food source, as shown in Figure 5.2. Ants are allowed to freely move between the nest and food source and the number of ants that chose one of the branches is observed over time. Before starting the experiment there are no pheromones on the paths and as ants walk they deposit small amounts of pheromones behind them. The experiment is repeated with different lengths of the two branches of the double bridge, wherellis the length of the longer andlsis the length of the shorter branch.

In the first case (Figure 5.2a) the bridge has two branches of equal lengths,ll/ls= 1. Since there are no pheromones, the ants do not have a preferred path so they randomly choose a branch.

With time, the majority of ants choose only one of the two branches even though both branches are of equal length. This can be explained if we observe the pheromone trails. Due to random fluctuations, one branch is chosen by a few more ants than the other branch which causes more pheromones to be deposited on that branch. A stronger pheromone trail will attract more ants and result in an even stronger pheromone trail which will in the end cause all ants to converge to one branch. This process is an example of self-organizing behaviour we discussed earlier.

30

15 cm

Nest Food

(a) Double bridge with branches of equal length.

15 cm

Nest Food

(b) Double bridge with branches of different lengths.

15 cm

Nest Food

(c) Double bridge with branches of different lengths where only the longer branch is accessible.

Figure 5.2: Double bridges experiment with Argentine ant colony. The figures show a double bridge placed between a nest of ants and a food source.

In the second case, the bridge has two branches where the longer one is twice the length of the shorter branch, ll/ls = 2 (Figure 5.2b). When the experiment is started the ants have no pheromone trail to follow so both branches appear equally "good" to them and both branches are chosen equally often as in the first case. The ants that choose the shorter branch are quicker to get to the food source and start their return to the nest. On their way back they have to make another decision and the higher pheromone values on the shorter branch will bias them towards the shorter branch. With time, more pheromones accumulate on the shorter branch and most of the ants choose it over the longer branch. Some ants still choose the longer branch and this can be seen as a form ofpath exploration.

In the third case, the ants are only presented with the longer branch (Figure 5.2c). After 30 minutes the shorter branch is offered but the ants were trapped in using the longer branch. The shorter branch is only sporadically chosen by very few ants. This can be explained by observing the pheromone trails. Over the first 30 minutes of the experiment the ants deposit a large amount of pheromones on the longer branch. After the shorter branch is offered, all ants will choose the dominant pheromone trail and the shorter branch is chosen only sporadically. Even though

with time, more ants will start to choose the shorter branch, the majority of ants will still use the longer and keep reinforcing the pheromone trails. This autocatalytic behaviour cannot be avoided because the pheromone trails do not evaporate fast enough.

From colony to algorithm

Figure 5.3 shows two double bridges connected in a sequence between the nest and food source through three stages of ant behaviour. Each bridge has two branches where the longer one is twice the length of the shorter branch,ll/ls = 2(Figure 5.2b). In the first stage (Figure 5.3a), there are no pheromone trails yet and the ants randomly select branches until they construct an initial solution. In the second stage (Figure 5.3b) the pheromone trails are existent but there is still no dominant trail that the majority of ants will follow so a lot of exploration can be seen. In the third stage (Figure 5.3c) there is a dominant pheromone trail that is chosen by the majority of ants and follows both shorter branches.

(a) Stage 1: initial path

construction (b) Stage 2: exploration (c) Stage 3: converging Figure 5.3: Three stages of the double bridge experiment with unequal lengths of brides. The ants move from their nest (blue) to the food source (yellow) and leave a pheromone trail behind

them that is depicted with an orange or red line. The stronger the pheromone trail, the thicker the line.

ACO uses the ant’s behaviour to model a self-organizing distributed system for finding the shortest path. Real ants are replaced withant construction algorithmsand pheromone trails are replaced with apheromone modelthat stores numeric values instead of ant produced chemicals.

The ant construction algorithm usespheromone valuesform the pheromone model andheuristic valuesfrom a heuristic function to make an informed decision in each step.

32

The three previously described stages can also be observed in ACO. Before the metaheuris-tic is started, an initial solution has to be constructed and the pheromone values have to be initialized. When the algorithm is started we repeat three basic steps: construct ant solutions, update pheromones and perform daemon actions (optional). After some time we might observe stagnation in the algorithm because it will converge towards a dominant solution that is strongly reinforced by pheromone values. These three steps are repeated (in parallel or sequence) and the specifics of the implementation are left to its author.

In Algorithm 5.2 we provide these steps in a pseudo-code for ACO exactly as it was de-scribed in Dorigo and Stützle (2004) in Figure 2.1, page 38.

Algorithm 5.2ACO metahueristic – Basic steps

1: whileschedule activitiesdo

2: construct ant solutions

3: update pheromones

4: daemon actions % optional

5: end while

Daemon actions are problem specific actions that are applied after the ant construction phase and in some cases after the pheromone update. They include centralized actions that cannot be performed by single ants, such as local search improvement or gathering of global information for future decisions.