0% found this document useful (0 votes)
52 views

Ant Colony Optimization For Finding The Global Minimum: M. Duran Toksari

The document proposes an ant colony optimization (ACO) algorithm to find the global minimum of a function. The algorithm is inspired by how real ants find food sources. Each ant starts with a random initial position and only searches near the best previously found solution, represented by a higher pheromone level. As iterations continue, the search range decreases, converging toward the global minimum. The algorithm is tested on benchmark problems and compared to other heuristic methods, finding competitive results.
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)
52 views

Ant Colony Optimization For Finding The Global Minimum: M. Duran Toksari

The document proposes an ant colony optimization (ACO) algorithm to find the global minimum of a function. The algorithm is inspired by how real ants find food sources. Each ant starts with a random initial position and only searches near the best previously found solution, represented by a higher pheromone level. As iterations continue, the search range decreases, converging toward the global minimum. The algorithm is tested on benchmark problems and compared to other heuristic methods, finding competitive results.
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/ 9

Applied Mathematics and Computation 176 (2006) 308–316

www.elsevier.com/locate/amc

Ant colony optimization for finding the global minimum


M. Duran Toksari
Erciyes University, Engineering Faculty, Industrial Engineering Department, 38039 Kayseri, Turkey

Abstract

The ant colony optimization (ACO) algorithms are multi-agent systems in which the behaviour of each ant is inspired
by the foraging behaviour of real ants to solve optimization problem. This paper presents the ACO based algorithm to find
global minimum. Algorithm is based on that each ant searches only around the best solution of the previous iteration. This
algorithm was experimented on test problems, and successful results were obtained. The algorithm was compared with
other methods which had been experimented on the same test problems, and observed to be better.
 2005 Elsevier Inc. All rights reserved.

Keywords: Ant colony optimization; Global minimum; Metaheuristics; Random optimization

1. Introduction

Many heuristic methods such as random search technique (ARSET) [1], heuristic random optimization
(HRO) [2] and David–Fletcher method were developed to find global minimum. In this paper, ACO based
algorithm will be suggested to find global minimum. ACO belong to class of biologically inspired heuristics.
The basic idea of ACO is to imitate the cooperative behaviour of ant colonies.
The function should have many local minimum points, but only one of them is the global minimum. If
F(xmin) 6 F(x) for all x values, xmin value is defined as the point makes the function minimum. If F(x) is con-
tinuous and differentiable, the minimum value can be found on the point dF dx
. However, wherever the function is
not differentiable, it could prove more advantageous to utilize stochastic methods instead of deterministic ones
[1].
The paper is organized as follows. First, ACO will be explained shortly. The proposed ACO based algo-
rithm to find global minimum will be detailed in Section 3. In Section 4, the algorithm will be solved on five
benchmark problems. Finally, the proposed algorithm will be compared with other heuristic methods.

2. Ant colony optimization (ACO)

The idea of imitating the behaviour of ants for finding good solutions to combinatorial optimization prob-
lems was initiated by Dorigo [3]. The principle of these methods is based on the way ants search for food and

E-mail address: [email protected]

0096-3003/$ - see front matter  2005 Elsevier Inc. All rights reserved.
doi:10.1016/j.amc.2005.09.043
M.D. Toksari / Applied Mathematics and Computation 176 (2006) 308–316 309

Fig. 1. Ants finding the shortest path around an obstacle.

Step 1. Initialization
- Initialize pheromone trail

Step 2. Solution construction


- For each ant Repeat
Solution construction using the pheromone trail

Step 3. Update the pheromone trail


Until stopping criteria

Fig. 2. A generic ACO algorithm.

find their way back to the nest. During trips of ants a chemical trail called pheromone is left on the ground.
The role of pheromone is to guide the other ants towards the target point. For one ant, the path is chosen
according to the quantity of pheromone.
As illustrated in Fig. 1, when facing an obstacle, there is an equal probability for every ant to choose the left
or right path. As the left trail is shorter than the left one and so required less travel time, it will end up with
higher level of pheromone. More the ants will take the right path, higher the pheromone trail is. This fact will
be increased by the evaporation stage.
The general ACO algorithm is illustrated in Fig. 2. The procedure of the ACO algorithm manages the
scheduling of three activities [4,5]: The first step consists mainly in the initialization of the pheromone trail.
In the iteration (second) step, each ant constructs a complete solution to the problem according to a proba-
bilistic state transition rule. The state transition rule depends mainly on the state of the pheromone. The third
step updates quantity of pheromone; a global pheromone updating rule is applied in two phases. First, an
evaporation phase where a fraction of the pheromone evaporates, and then a reinforcement phase where each
ant deposits an amount of pheromone which is proportional to the fitness of its solution. This process is iter-
ated until a stopping criterion.

3. Ant colony optimization to find global minimum

The ACO algorithm has been used to find global minimum. In the proposed algorithm, first, number of m
ants being associated with m random initial vectors (xkinitial , (k = 1, 2, . . . , m)) (or all of them may be set to the
same value) (Fig. 3a).
Then, modifications based on the pheromone trail are then applied to each vector. In the proposed ant col-
ony based algorithm, quantity of pheromone (st) only intensifies around the best objective function value
obtained from the previous iteration and all ants turned towards there to search a solution (Fig. 3b). The solu-
tion vector of each ant is updated at the beginning of each iteration using the following formula:
xkt ¼ xbest
t1  dx ðt ¼ 1; 2; . . . ; IÞ; ð3:1Þ
310 M.D. Toksari / Applied Mathematics and Computation 176 (2006) 308–316

Fig. 3. (a) Number of 5 ants being associated with 5 random initial vectors (the best vector is on the D point. So, quantity of pheromone
only intensifies between global minimum point and D point). (b) The first iteration. (Searching was only done between global minimum
point and D point. At the end of the iteration 1, the best vector is on the B1 point. So, quantity of pheromone only intensifies between
global minimum point and B1 point.)

where xkt is solution vector of the kth ant at iteration t, xbest


t1 is the best solution obtained at the iteration t  1
and dx is a vector generated randomly from [a, a] range to determine the length of jump. At the end of each
iteration, quantity of pheromone (st) is updated. First, quantity of pheromone (st) is reduced to simulate the
evaporation process with the following formula:
st ¼ 0:1  st1 . ð3:2Þ

Fig. 4. Ant colony optimization for the global minimum.


M.D. Toksari / Applied Mathematics and Computation 176 (2006) 308–316 311

t =k× I, n× I ≤ I
k=1 k=2 k=3 k=n

Global
Initial Minimum
Minimum

Fig. 5. Jumping movements.

Then, it is only increased around the best objective function value obtained from the previous iteration.
 
best
st ¼ st1 þ 0:01  f ðt1 Þ . ð3:3Þ

This process is iterated until number of maximum iteration (I).


In formula (3.1), (+) sign uses when point xkt is on the left of global minimum on the x-coordinate axis. On
the other hand, () sign uses when point xkt is on the right of global minimum on the x-coordinate axis. The
direction of movement is defined by Eq. (3.4)
xbest best best
initial ¼ xinitial þ ðxinitial  0:01Þ. ð3:4Þ
If f ðxbest best
initial Þ 6 f ðxinitial Þ, (+) sign is used into (3.1). Otherwise, () sign is used. (±) sign defines direction of
movement that appears after initial solution.
Steps of the proposed algorithm are as Fig. 4. pffiffi
Setting a = 0.1 · a at the end of each iteration I to not pass over global minimum (I is number of max-
imum iteration). Thus, the length of jumping will gradually decrease. It would be explained in Fig. 5.

4. Benchmark problems

In this section, performance of the proposed ACO based algorithm is examined on five test problems. Stud-
ied problems in fact are the ones studied by numerous authors before. Solutions obtained by using the algo-
rithm are compared with previous solutions obtained for these problems.

4.1. Benchmark problem 1

The result obtained by using proposed ACO based algorithm for a function which is one of the problems
solved with ARSET [1] and HRO [2]. Objective function of the problem is given in Eq. (4.1), and Fig. 6 shows
the graph of function

30

25

20

15
f(x)

10

0
-5 -4 -3 -2 -1 0 1 2 3 4 5
-5
x

Fig. 6. Objective function of benchmark problem 1.


312 M.D. Toksari / Applied Mathematics and Computation 176 (2006) 308–316

Table 1
Results obtained by proposed algorithm for benchmark problem 1
Best x Best f(x)
Epoch number = 500 3 3

Table 2
Comparison between the proposed ACO based algorithm and HRO and ARSET algorithms for benchmark problem 1
Algorithms Best x Best f(x) Epoch number
HRO 3.000324 2.9999998 1000
ARSET 3 3 1000
Proposed ACO based algorithm 3 3 500

 
x2 ; if x 6 1;
min f ðxÞ ¼ 2 ð4:1Þ
ðx  3Þ  3; if x > 1.
Function has two minimums, one being on x = 0 and the other one on x = 3. The point on x = 0 denotes the
local minimum, while the point on x = 3 denotes the global minimum.
1
The proposed ACO based algorithm is initiated with the initial solutions xkinitial ¼ 0:5; a ¼ randomð10Þ ,m=5
and I = 100, and run 10 times. Epoch number is m · I = 500. Best solution obtained is shown in Table 1.
As the best value of x, HRO and ARSET algorithms are obtained x = 3.000324 and x = 3 with epochs
1000, respectively. Best value of x obtained by using the proposed ACO based algorithm is x = 3 with epochs
500. The comparison between HRO, ARSET and proposed ACO based algorithm is shown in Table 2. It is
clear that the proposed ACO based algorithm outperforms both HRO and ARSET.

4.2. Benchmark problem 2

Benchmark problem is taken from Li and Rhinehart [2]. The result obtained by using proposed ACO based
algorithm for a function which is one of the problems solved with ARSET and HRO. Objective function of the
problem is given in Eq. (4.2), and Fig. 7 shows the graph of function
 
4  
4
1 1
x  sin þ x  cos . ð4:2Þ
x x

It is clear that the minimum value of the function is on x = 0.

0.7

0.6

0.5

0.4
f(x)

0.3

0.2

0.1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x

Fig. 7. Objective function of benchmark problem 2.


M.D. Toksari / Applied Mathematics and Computation 176 (2006) 308–316 313

Table 3
Comparison between the proposed ACO based algorithm and ARSET algorithms for benchmark problem 2
Algorithms Best x Best f(x) Epoch number
ARSET 1.90E006 6.58E024 10 000
Proposed ACO based algorithm 3.36E10 8.16E039
ARSET 4.39E008 1.85E030 30 000
Proposed ACO based algorithm 1.57E11 5.47E044
ARSET 2.53E011 2.21E043 50 000
Proposed ACO based algorithm 7.79E012 1.40E045

The proposed ACO based algorithm is initiated with the initial solutions, m = 10, 30 and 50 and I = 1000,
1
and run 10 times, taking the initial values as a ¼ randomð10Þ and xkinitial ¼ 1. Epoch numbers are m · I = 10 000,
30 000 and 50 000, respectively.
As the best value of x, HRO algorithm is obtained x = 0.000024. In Table 3, best values of x obtained by
using the proposed ACO based algorithm are compared with ARSET. Table 3 shows obviously that the pro-
posed ACO based algorithm outperforms both HRO and ARSET.

4.3. Benchmark problem 3

A function with two variables is shown in Eq. (4.3) as the third benchmark problem [6]
8 4
ðx  3Þ ðy  3Þ
f ðx; yÞ ¼ 8
þ . ð4:3Þ
1 þ ðx  3Þ 1 þ ðy  3Þ4
T T T T
Function has a minimum that is ½ x y  ¼ ½ 3 3  . The point on ½ x y  ¼ ½ 3 3  denotes the global min-
imum, and f(x, y) = 0 is on it. Fig. 8 shows the graph of function.
Applying David–Fletcher method, Schilling and Harris state that the best outcome of the problem is
T T
½ x y  ¼ ½ 3:0196706 3:0004380  .
ARSET algorithm is run 10 times for with various combinations of N and E. The best values obtained by
using the proposed ACO based algorithm are compared with ARSET in Table 4.
The proposed ACO based algorithm is initiated with the initial solutions, m = 10, 30 and 50 and I = 1000,
1
and run 10 times, taking the initial values as a ¼ randomð10Þ and xkinitial ¼ ½ 0 0 . Epoch numbers are m · I =
10 000, 30 000 and 50 000, respectively. The proposed algorithm found global minimum point.

Fig. 8. Objective function of benchmark problem 3.


314 M.D. Toksari / Applied Mathematics and Computation 176 (2006) 308–316

Table 4
Comparison between the proposed ACO based algorithm and ARSET algorithms for benchmark problem 3
Algorithms Best x Best y Best f(x, y) Epoch number
ARSET 3.0157 2.9999 3.71E015 10 000
Proposed ACO based algorithm 3 · 2066E09 3 · 2384E09 2.62E021
ARSET 3.0072 3 7.32E018 30 000
Proposed ACO based algorithm 3 3 0
ARSET 3.0015 3 5.04E023 50 000
Proposed ACO based algorithm 3 3 0

4.4. Benchmark problem 4

Rosenbrock function, also known as RosenbrockÕs Banana Function, is taken as the fourth benchmark
problem [7]. The minimum points of the function are x = 1, y = ±1 and f(x, y) = 0 within the range
½ 0 6 . The graph of function generates shown in Fig. 9. Objective function of the problem is given follows:
 
2 2
f ðx; yÞ ¼ 100  ðx  y 2 Þ þ ð1  xÞ . ð4:4Þ

ARSET algorithm is run with various combinations of N and E [1]. The best values obtained by using the
proposed ACO based algorithm are compared with ARSET in Table 5, taking the initial values as
1
a ¼ randomð10Þ and xkinitial ¼ ½ 1:9 2 .

Fig. 9. Objective function of benchmark problem 4.

Table 5
Comparison between the proposed ACO based algorithm and ARSET algorithms for benchmark problem 4
Algorithms Best x Best y Best f(x, y) Epoch number
ARSET 0.99401 0.997 3.58E005 10 000
Proposed ACO based algorithm 1.00021 1.00004 1.73E006
ARSET 1.0001 1.0001 2.03E008 30 000
Proposed ACO based algorithm 1 1 5.68E12
ARSET 1 1 4.02E16 50 000
Proposed ACO based algorithm 1 1 0
M.D. Toksari / Applied Mathematics and Computation 176 (2006) 308–316 315

Fig. 10. Objective function of benchmark problem 5.

Table 6
Comparison between the proposed ACO based algorithm and ARSET algorithms for benchmark problem 5 within the range ½ 10 10 
Algorithms Best x Best y Best f(x, y) Epoch number
ARSET 9.9968 3.46E009 9.9968 10 000
Proposed ACO based algorithm 9.9989 2.01E004 9.9989
ARSET 9.9996 2.08E018 9.9996 30 000
Proposed ACO based algorithm 9.9999 6.05E008 9.9999
ARSET 10 6.67E008 10 50 000
Proposed ACO based algorithm 10 8.07E011 10

Both ARSET algorithm and the proposed ACO based algorithm find the global minimum that is point
T T
½x y  ¼ ½1 1 .

4.5. Benchmark problem 5

An indifferentiable function is studied as the fifth benchmark problem. It is given in Eq. (4.5). Graph within
the range ½ 10 10  is shown in Fig. 10. Results of the proposed ACO based algorithm are compared with
1
ARSET in Table 6, taking the initial values as a ¼ randomð10Þ and xkinitial ¼ ½ 9 9 .
x
f ðx; yÞ ¼ . ð4:5Þ
1 þ jyj

5. Conclusions and future work

In this paper, a powerful and robust algorithm which is based on ant colonies, is proposed to find global
minimum. When compared with previous methods to find global minimum such as ARSET, HRO and
David–Fletcher method, results shows that proposed algorithm has a noticeable performance. The proposed
ACO based algorithm found exactly global minimum of four benchmark problems, so, it is obvious that the
best values obtained by using the proposed ACO based algorithm are the best found values for tested bench-
mark problems.
316 M.D. Toksari / Applied Mathematics and Computation 176 (2006) 308–316

Future works include an application of the proposed ACO based algorithm to find global maximum and
using hybrid approaches of popular metaheuristics such as genetic algorithm, tabu search, simulated anneal-
ing, neural networks, etc. to find global minimum faster.

References

[1] C. Hamzacebi, F. Kutay, A heuristic approach for finding the global minimum: adaptive random search technique, Applied
Mathematics and Computation (2005).
[2] J. Li, R.R. Rhinehart, Heuristic random optimization, Computers and Chemical Engineering 22 (3) (1998) 427–444.
[3] M. Dorigo, Optimization, learning and natural algorithms, Ph.D. Thesis, Politecnico di Milano, Italy, 1992.
[4] M. Dorigo, G. Di Caro, Ant colony optimization: a new meta-heuristic, in: Proceeding of the 1999 Congress on Evolutionary
Computation, vol. 2, 1999, pp. 1470–1477.
[5] E.G. Talbi, O. Roux, C. Fonlupt, D. Robillard, Parallel ant colonies for the quadratic assignment problem, Future Generation
Computer Systems 17 (2001) 441–449.
[6] R.J. Schilling, S.L. Harris, Applied Numerical Methods for Engineers, Brooks/Cole, Pacific Grove, 2000.
[7] R.L. Fox, Optimization Methods for Engineering Design, Addison-Wesley Publishing Company, California, 1971.

You might also like