2.2.2. Trapping in antlion’s pits
As discussed above, random walks of ants are affected by
antlions’ traps. In order to mathematically model this assumption,
the following equations are proposed:
c
t
i
¼ Antlion
t
j
þ c
t
ð2:8Þ
d
t
i
¼ Antlion
t
j
þ d
t
ð2:9Þ
where c
t
is the minimum of all variables at t-th iteration, d
t
indicates
the vector including the maximum of all variables at t-th iteration,
c
t
j
is the minimum of all variables for i-th ant, d
t
j
is the maximum of
all variables for i-th ant, and Antlion
t
j
shows the position of the
selected j-th antlion at t-th iteration.
Eqs. (2.8) and (2.9) show that ants randomly walk in a hyper
sphere defined by the vectors c and d around a selected antlion.
A conceptual model of this behaviour is illustrated in Fig. 3.
Fig. 3 shows a two-dimensional search space. It may be
observed that ants are required to move within a hypersphere
around a selected antlion.
2.2.3. Building trap
In order to model the antlions’s hunting capability, a roulette
wheel is employed. As Fig. 3 show ants are assumed to be trapped
in only one selected antlion. The ALO algorithm is required to uti-
lize a roulette wheel operator for selecting antlions based of their
fitness during optimization. This mechanism gives high chances
to the fitter antlions for catching ants.
2.2.4. Sliding ants towards antlion
With the mechanisms proposed so far, antlions are able to build
traps proportional to their fitness and ants are required to move
randomly. However, antlions shoot sands outwards the center of
the pit once they realize that an ant is in the trap. This behaviour
slides down the trapped ant that is trying to escape. For mathemat-
ically modelling this behaviour, the radius of ants’s random walks
hyper-sphere is decreased adaptively. The following equations are
proposed in this regard:
c
t
¼
c
t
I
ð2:10Þ
d
t
¼
d
t
I
ð2:11Þ
where I is a ratio, c
t
is the minimum of all variables at t-th iteration,
and d
t
indicates the vector including the maximum of all variables
at t-th iteration.
In Eqs. (2.10) and (2.11), I ¼ 10
w
t
T
where t is the current itera-
tion, T is the maximum number of iterations, and w is a constant
defined based on the current iteration (w = 2 when t > 0.1T, w =3
when t > 0.5T, w = 4 when t > 0.75T, w = 5 when t > 0.9T, and
w = 6 when t > 0.95T). Basically, the constant w can adjust the
accuracy level of exploitation.
Fig. 4 also shows the decreasing behaviour using Eqs. (2.10) and
(2.11). These equations shrink the radius of updating ant’s
positions and mimics sliding process of ant inside the pits. This
guarantees exploitation of search space.
2.2.5. Catching prey and re-building the pit
The final stage of hunt is when an ant reaches the bottom of the
pit and is caught in the antlion’s jaw. After this stage, the antlion
pulls the ant inside the sand and consumes its body. For mimicking
this process, it is assumed that catching prey occur when ants
becomes fitter (goes inside sand) than its corresponding antlion.
An antlion is then required to update its position to the latest posi-
tion of the hunted ant to enhance its chance of catching new prey.
The following equation is proposed in this regard:
Antlion
t
j
¼ Ant
t
i
if f ðAnt
t
i
Þ > f Antlion
t
j
ð2:12Þ
where t shows the current iteration, Antlion
t
j
shows the position of
selected j-th antlion at t-th iteration, and Ant
t
i
indicates the position
of i-th ant at t-th iteration.
2.2.6. Elitism
Elitism is an important characteristic of evolutionary algo-
rithms that allows them to maintain the best solution(s) obtained
at any stage of optimization process. In this study the best antlion
obtained so far in each iteration is saved and considered as an elite.
Since the elite is the fittest antlion, it should be able to affect the
movements of all the ants during iterations. Therefore, it is
assumed that every ant randomly walks around a selected antlion
by the roulette wheel and the elite simultaneously as follows:
Ant
t
i
¼
R
t
A
þ R
t
E
2
ð2:13Þ
where R
t
A
is the random walk around the antlion selected by the
roulette wheel at t-th iteration, R
t
E
is the random walk around the
elite at t-th iteration, and Ant
t
i
indicates the position of i-th ant at
t-th iteration.
Fig. 3. Random walk of an ant inside an antlion’s trap.
0 20 40 60 80 100
-100
-50
0
50
100
Iteration (t)
lower bound (c) & upper bound (d)
Fig. 4. Adaptive lower (c
t
) and upper (d
t
) bounds.
S. Mirjalili / Advances in Engineering Software 83 (2015) 80–98
83