On the Development of a Hybridized Ant Colony Optimization (HACO) Algorithm ()
1. Introduction
Ant System algorithms have been founded on the observation of real ant colonies by various researchers to which Marco Dorigo a key factor as it was found in his Ph.D. Thesis of 1992, where the concept was first brought to light. By living in colonies, ants’ social behavior is directed more to the survival of the colony than that of a single individual member of the colony. An interesting and significantly important behavior of ant colonies is their foraging behavior, and in particular, their ability to find the shortest route between their nest and a food source, realizing that they are almost blind. Without any leader that guides the ants to optimal trajectories, the ants manage to find these optimal trajectories with time, by interacting with their local environment.
The ants initially search for food in a random fashion such that, when they have found some, they return home depositing chemicals, called pheromones. According to [1] , these pheromones attract other ants to follow the same path, and they in turn also deposit pheromones on their way back. Over a period of time, this behavior leads to the emergence of paths, which can be shown to be near-optimal which is essentially done at random. By smelling the pheromone, there is a higher probability that the trail with a higher pheromone concentration will be chosen. The pheromone trail allows ants to find their way back to the food source and vice versa.
It follows that when a number of paths are available from the nest to a food source, a colony of ants may be able to exploit the pheromone trail deposited by the individual members of the colony to discover the shortest path from the nest to the food source and back [2] . As more ants choose a path to follow, the pheromone on the path builds up, making it more attractive to other ants seeking food and hence more likely to be followed by other ants.
In general, Ant Colony Optimization (ACO) algorithms employ a finite size of artificial agents with defined characteristics which collectively search for good quality solutions to the problem under consideration. Starting from an initial state selected according to some case-dependent criteria, each ant builds a solution, which is similar to a chromosome in a genetic algorithm. While building its own solution, each ant collects information on its own performance and uses this information to modify the representation of the problem, as seen by the other ants [3] . The ant’s internal states store information about the ant’s past behavior, which can be employed to compute the goodness/value of the generated solution. Artificial ants are permitted to release pheromone while developing a solution or after a solution has fully been developed, or both.
The amount of pheromone deposited is made proportional to the goodness of the solution an artificial ant has developed (or is developing). Rapid drift of all the ants towards the same part of the search space is avoided by employing the stochastic component of the choice decision policy and the pheromone evaporation mechanism. To simulate pheromone evaporation, the pheromone persistence coefficient, ρ, is defined which enables greater exploration of the search space and minimizes the chance of premature convergence to suboptimal solutions.
A probabilistic decision policy is also used by the ants to direct their search towards the most interesting regions of the search space. The level of stochasticity in the policy and the strength of the updates in the pheromone trail determine the balance between the exploration of new points in the state space and the exploitation of accumulated knowledge [3] .
This paper is structured as follows: Section 2 describes and briefly reviews variants Ant systems that have been developed over years by various researchers. While Section 3 is dedicated to the introduction and description in detail of the Hybridized Ant Colony Optimization (HACO) algorithm. Section 4 presents a step by step computational procedure of the HACO algorithm. Section 5 concludes the paper.
2. Ant System Variants
The concept of metaheuristic is a general purposes algorithmic framework that can be applied to different optimization problems with relatively few modifications to make them adaptable to a specific problem. In the view of [3] , it was observed that, when adapting an Ant Colony Optimization approach to a particular problem, the following choices need to be adapted:
A) How do the ants construct a solution?
B) How do the ants choose the next step to take?
C) How is the solution post-optimized?
D) How is the pheromone deposit updated?
Any variant of ACO algorithm that will be regathered as amenable will find answers to all the afore mentioned questions. There are numerous examples of Combinatorial Optimization problems and the variants being handled using Ant Colony Optimization algorithms. This is a type of algorithm that seeks to model the emergent behaviour observed in ant colonies and utilize this behaviour to solve problems. Before we roll out the HACO algorithm there is need to have an outline to various ACO developed by various researchers. This leads us to variants ACO algorithms that have been developed over years by various researchers and improvements that ACO algorithms have witnessed.
In the last three decades, there have been variants Ant Colony Optimizations due to modification and improvements in one respect or the other. It must be noted that, the several variants Ant Colony Optimization differing most importantly on when and how pheromones are updated. However, some of the variants are highlighted and discussed in what follows.
2.1. Ant System (AS)
Ant Colony Optimization (ACO), called Ant System in [4] was inspired by the studies and the behaviour of ants [5] . The ant-colony metaheuristic framework was introduced by [1] , which enabled ACO to be applied to a range of combinatorial optimization problems. The authors in [1] also reported the successful application of ACO algorithms to a number of bench-mark combinatorial optimization problems. ACO in [3] , is “a metaheuristic that is inspired by the pheromone trail laying and following behaviour of some ant species”.
Ant System is the first ACO algorithm proposed in literature. The AS is based on the behavior of real ants searching for food. Real ants communicate with each other using an aromatic essence, called pheromone, that they lay down on the path they traverse. By [6] , the pheromone accumulates when more and more ants pass through the same path. Nevertheless, the pheromone will evaporate if no ants continue to pass. The selection of the pheromone trail reflects the length of the paths as well as the quality of the food source found. [7] reported the use of AS to solve Traveling Salesman Problem (TSP), Quadratic Assignment Problems (QAP) and Job-Shop Scheduling.
Its main characteristics are as follows: at each iteration, the pheromone values are updated by all the m ants that have built a solution in the iteration itself. At each step, an ant at node i chooses to go to a node j through the edge
and this arc is added to the solution. The repetition of this step stops when the ant has completed its tour. The pheromone,
, associated with the edge joining cities, i and j, is updated using the relation:
(1)
where ρ is the evaporation rate, m is the number of ants, and
is the quantity of pheromone laid on edge
by ant k:
(2)
where
is the length of the tour constructed by ant k.
2.2. Ant Colony System (ACS)
The ant colony system (ACS) was developed as in [8] and [9] to improve the performance of AS. A different state transition rule was used by [5] to which a local pheromone updating rule was also added. [2] Proposed an ACS algorithm based on AS. The first difference between the ACS algorithm and the AS concerns the update of the pheromone trail. The update done at the end of an iteration of the algorithm is called offline.
Once all the ants have built a solution, a pheromone trail is added to the arcs used by the ant that has found the best tour from the beginning of the trial. Thus, instead of allowing all the m ants to update the pheromones as in AS, only the ant that has found the best solution in ACS deposits pheromone on the arcs of the best tour. The local pheromone update is performed by all the ants after each construction step. Each ant applies update only to the last edge traversed as opined by [10] thus:
(3)
where
is the pheromone decay coefficient, and
is the initial value of the pheromone.
The offline pheromone update, similarly to Max-Min Ant System (MMAS), is applied at the end of each iteration by the ant with the shortest tour, which can be either the iteration-best or the best-so-far. The update formula is:
(4)
In MMAS, not all pheromone levels are evaporated, as with the AS, but only those that also receive a pheromone deposit.
2.3. MAX–MIN Ant System (MMAS)
In MMAS, only one single ant is used to update the pheromone trails after every iteration. The algorithm achieves a strong exploitation of the search history by allowing only the best solutions to add pheromone during the pheromone trail update. Its characterizing elements are that only the best ant updates the pheromone trails and that the value of the pheromone is bounded by
. Also, the use of a rather simple mechanism for limiting the strengths of the pheromone trails effectively avoids premature convergence of the search.
The pheromone update is implemented as follows:
(5)
where
and
are respectively the upper and lower bounds imposed on the pheromone; the operator
is defined as:
(6)
and
is defined by:
(7)
where
is the length of the tour of the best ant. This may be either the best tour found in the current iteration i.e. iteration-best,
or the best solution found since the start of the algorithm-best-so-far,
or a combination of both [10] and [11] . We observe that quite a number of parameters need to be modified and improved upon.
The Hybridized Ant Colony Optimization hinges on the strengths of the afore mentioned variants and improves on the drawbacks leading to the hybridized algorithm stressing on the Transition Probability, Jump Transition Probability, generating Randomized Numbers that guides in determining the path traversed by the ants, pheromone updating rule, pheromone evaporation residue and diverse local search approaches are proposed hence, evaluating the function values to which the best and worst function values is identified will be discussed in the next section.
3. Hybridized Ant Colony Optimization (HACO) Algorithm
The HACO algorithm is described as follows:
Step 1: Initialize,
. Set
and
.
where
represent the number of Ants in the colony.
represents a set of permissible discrete values of the Design Variables,
, and
. The interval,
or
, is divided into n equal parts such that, each part is assigned to each of the design variables,
. The pheromone evaporation rate is assumed to be
. It is assumed that all the ants will deposit equal amount of pheromone at the initial stage hence,
.
Step 2: a) Compute the Transition Probability,
, using:
(8)
where
is the highest function value,
is the sum of the frequency of the
where more than one exist and the Jump Transition Probability,
is computed using:
(9)
where the subscripts, i and j of
and
are the iterations and paths counters respectively. The cumulative transition probabilities’ values are computed and it is being associated with the paths traversed by the ant based on the value of the transition probability obtained using the expressions (8) and (9).
N.B: At
, the Jump Transition Probability,
, is not computed since each path has equiprobable chances of being traversed. Also, the
and
. The Jump Transition Probability,
, is aimed at speeding up the transition probability of the path traversed after a path have been identified as being best owning to the function value.
b) Compute the Cumulative Transition Probability,
.
At iteration
, the Cumulative Transition Probability,
along the path, j, is given by:
(10)
At iteration
, the Cumulative Transition Probability,
along the path, j, is given by:
(11)
Step 3: a) Generate N random numbers.
The specific path chosen by a particular ant will then be determined using the Roulette Wheel selection process of randomization. From the closed interval
, N random numbers:
(12)
are generated such that, an ant,
, is assigned a random number each. The assigned randomized number is then further used as a guide towards the path traversed by the ant.
b) Correlate each of the randomized numbers,
.
Correlate each of the randomized numbers,
, with a transition probability cumulative value,
, such that the randomized number,
, falls within the range of value of the
along a particular path thus:
(13)
Step 4: a) Evaluate the objective function value,
.
The objective function value,
is evaluated with the value assigned to the design variable,
, that corresponds to the cumulative transition probability’s paths, j, of the design variable path. i.e.
(14)
b) Determine the best and worst paths.
The best and worst paths among the N paths chosen by different ants are determined using the relation:
(15)
(16)
Step 5: Test for convergence of the process.
The process is assumed to have converged if all the ants take the same path. i.e.
or (17a)
(17b)
If the convergence criterion has been satisfied, then stop. Else, it will be assumed that, all the ants return to the colony and start the search for a shorter path to the food source again.
Step 6: a) Calculate the Pheromone Residue, M:
. (18)
where
, rate of pheromone evaporation, is a user defined parameter.
b) Evaluate the objective function value’s ratio
The range ratio of the best objective function value,
, to the worst objective function value,
, in maximizing a function given by
, is evaluated using the relation:
(19)
where the summation extends over all the best ants,
(if multiple ants take the same best path). The subscripts, j, is the path preceding node and k is the path succeeding node.
c) Compute the pheromone deposit update:
To compute the pheromone deposits update set
and use the following relations:
(20)
(21)
where
is the pheromone on the node link,
, after updating and
is the pheromone on the link
. This is before the update is computed, then, go to Step 2.
4. Test Problems
The HACO algorithm is now applied to solve the following test problems:
Problem 1: Find the Maximum of
(22)
within the
range 220 - 300 using HACO algorithm.
Step 1: Let
represent the number of Ants in the colony.
Let
represent a set of permissible discrete values of the Design Variable,
, where
. The range,
or
, is divided into n equal parts such that, a part each is assigned to each of the design variables,
. Let
represent the pheromone evaporation rate. It is assumed that all the ants will deposit equal amount of pheromone at the initial stage hence,
.
Number of Ants = 4,
, are assumed within the range for
as:
Step 2: Compute the Transition Probability,
, of selecting the arc or ray (or the discrete values)
as:
(23)
(24)
The cumulative of the transition probability values are computed associated with different paths based on the transition probabilities values obtained from the expressions (8) and (9). The Cumulative Transition Probability,
at iteration i and path j is given by:
Hence,
N. B: Since none of the paths have been identified as
, the jump transition probability needs not be computed at this stage.
Step 3: a) Generate N random numbers,
, within the
. One random number for each ant thus:
(25)
b) Correlate each of the randomized numbers,
. with a transition probability cumulative value,
, which is of the most approximate value or the cumulative transition probability value’s range to which the randomized numbers value,
, fall:
(26)
Ant 1:
Ant 2:
Ant 3:
Ant 4:
Step 4: a) Evaluate the objective function value,
.
The objective function values,
are evaluated using values assigned to the design variable values,
, corresponding to the cumulative of the transition probability’s paths, j.
at
(27)
Ant 1:
Then,
. Hence,
.
Ant 2:
Then,
. Hence,
.
Ant 3:
Then,
. Hence,
.
Ant 4:
Then,
. Hence,
.
b) Determine the best and worst paths.
The best and worst paths among the N paths chosen by different ants are determined using the relation:
(28)
(29)
Hence,
at
and
at
.
Step 5: Test for convergence of the process. The process is assumed to have converged if all the N ants take the same path. i.e.
or (30)
(31)
However, if convergence has not been achieved, it will be assumed that all the ants will have to return home and start again in search of food. Since neither of the convergence conditions is met, the process has to continue.
Step 6: a) Calculate the Pheromone Evaporation constant, M.
Since the convergence criterion has not been met, there is need to calculate the pheromone evaporation constant, M, using the relation:
(32)
b) Evaluate the objective function value’s ratio:
(33)
where
.
c) Compute the Pheromone deposit update: Then, set the new iteration number as
, and update the pheromone deposits on different arcs (or discrete values of design variables) where
denotes the previous pheromone amount of the iteration after evaporation, which is taken as
can be computed by:
At
,
(34)
where
. It must be noted that the path,
is omitted. This is because, that was the path at which
has been identified.
With this, we go back to step 2.
Step 2: Compute the Transition Probability, (
) and Transition Probability Jump, (
) of selecting the arc:
and
where
is the frequency of the
,
,
and
This gives:
The Transition Probabilities would have been equiprobable but for the fact that, the transition probability has to jump at
. Hence,
Note that, there is a jump at this point. Hence,
Step 3: Generate N random numbers
in the
, one for each ant
a) Evaluate the objective function values corresponding to the complete paths
Step 4: Determine the best and worst paths among the N paths chosen by different ants
Step 5: At
,
,
where
and
can be computed as:
with the path 2 missed out. Hence,
for
and
With this, we set
and go back to step 2.
Step 2: Compute the Transition Probability (
) of selecting the arc
and
where
;
and
This gives
Step 3: a) Generate N random numbers
in the
, one for each ant:
b) Evaluate the objective function values corresponding to the complete paths:
Step 4: Determine the best and worst paths among the N paths chosen by different ants
Step 5:
,
where
,
and
can be computed as
for
and
With this we back go to step 2.
Step 2: Compute the Cumulative transition probability (
) of selecting the arc:
and
where
and
This gives:
Step 3: a) Generate N random numbers
in the
, one for each ant:
b) Evaluate the objective function values corresponding to the complete paths:
It can be seen that all the ants now follow the same path, that is, Ant 1, Ant 2, Ant 3 and Ant 4 follow the same path. Hence, this is acclaimed as the best path with:
and
.
5. Conclusion
In this paper, we tried to annex the strengths of AS, ACS and MMAS, Ant Colony Optimization algorithms, to obtain solution of optimization problems. To this means, due to high computational complexity in solving these problems using the earliest ACO algorithms, we modify the relation for determining the Transition Probability, formulate the Jump Transition Probability and Pheromone Evaporation Residue relations and introduce the process of correlating the randomized numbers,
, with the cumulative transition probability cumulative value,
, into the algorithm to obtain the best solution to build a Hybridized ACO such that the randomized number,
, falls within the range of value of the
along a particular path. Implementation of the method and numerical results that show the accuracy of the method, speedy convergence and low occupation of the computer memory are also discussed.