The behaviour of ACS-TSP algorithm when adapting both pheromone parameters using fuzzy logic controller

Received Feb 26, 2019 Revised Mar 27, 2020 Accepted Apr 11, 2020 In this paper, an evolved ant colony system (ACS) is proposed by dynamically adapting the responsible parameters for the decay of the pheromone trails ξ and ρ using fuzzy logic controller (FLC) applied in the travelling salesman problems (TSP). The purpose of the proposed method is to understand the effect of both parameters ξ and ρ on the performance of the ACS at the level of solution quality and convergence speed towards the best solutions through studying the behaviour of the ACS algorithm during this adaptation. The adaptive ACS is compared with the standard one. Computational results show that the adaptive ACS with dynamic adaptation of local pheromone parameter ξ is more effective compared to the standard ACS.


INTRODUCTION
Ant colony system (ACS) metaheuristic was proposed for the first time by Dorigo and Gambardella in 1997 [1,2], using as example application the travelling salesman problem (TSP) which is presented by a weighted graph G=(N,A), with N is the group of vertices representing the cities, and A the set of edges connecting the vertices N. In the interestof ameliorating the original ant system (AS), the importance of exploitation of accumulated informations collected by previous ants is token into consideration, concerning the exploration of new solutions of the search space. For this raison, two mechanisms were developed [3][4][5]. First, ants construct a pheasible solution during the solution construction phase, with probability q0 the solution component that maximizes the product between pheromone trail and heuristic information is chosen, that is While, with probability (1-q0) they perform a biased exploration, which is the same as in AS.
The state transition rule determined by (1) and (2) is called pseudo-random proportional rule. Where, q0 is a parameter that indicates the relative importance between exploration and exploitation (0 ≤ q0 ≤ 1). Second, a potent elitist rule is called to update pheromone trails. This rule has the purpose to avoid stagnation in a local optimum, by diminishing the pheromone of visited edges, therefore favouring exploration of new edges not yet visited. Where, ∊ (0, 1) is a parameter called local pheromone decay parameter, and 0 is a very small constant that initializes the pheromone trails with value 1 . , where n is the number of cities and is the length of a nearest neighbour tour.
Also, in ACS algorithm only the best ant is allowed to reinforce the globally best tour, in the purpose of directing the search and making it more precise. This is fulfilled through the use of the following rule: where, ∊ (0, 1) represents the global pheromone decay parameter, and is the best found so far tour's length.
The ACS has proved by these additions to be one of the most powerful algorithms to deal with NP-hard combinatorial optimization problems. However, in metaheuristic, parameter adaptation is considered as a big problem that affects the behavior of the algorithm, so that the adequate setting of parameters values is often leading to a good performance. Parameter adaptation problem requires specialized knowledge and a lot of experiences. In most applications of ACS the values of parameters are usually remained fixed. To improve the performance of the algorithm, many researchers have proposed adaptive methods to adjust the values of parameters. Nowadays, the fuzzy logic controller (FLC) becomes one of the most required methods in the field of parameter adaptation in heuristic and metaheuristic algorithms [6]. In fact, the concept of FLC is very easy to comprehend, since it possesses a human like intuition which makes it preferable for the controllers and the adapters [7].
Many researchers have applied the FLC to several variants of Ant Colony Optimization algorithms to adjust their parameters. In [8], Li et al developed a fuzzy ant colony optimization (FACO) to adapt the evaporated and deposited value of pheromone trail applied in a one-piece flow production system, using the age of pheromone trail and the ant's fitness as performance measures for the FLC algorithm. Also, Ahmadizar and Soltanpanah in [9] proposed a Fuzzy Logic concept to enhance the performance of ACO, by developing an effective Ant Colony Optimization to deal with reliability optimization problem for a series system with various choices. For their work, they considered the pheromone trails and the heuristic information as a fuzzy set.
Amir et al. [10], proposed in their work, a fuzzy logic controller (FLC) to adapt and q0 parameters automatically while solving the problem using the error of the so far best tour compared to the best-known tour for the TSP problem and the diversity between the found solutions by the population of ants as performance measures. For their parts, Neyoy et al. [11], used a FLC to dynamically adapting the parameter , in order to avoid early convergence. The main idea is increasing the value of parameter with the use of error and change of error which are considered as inputs of FLC, while respecting the average lambda branching factor that indicates the exploration level in the search area by measuring the distribution of the pheromone trails values. Also, Olivas et al. [12], proposed a dynamic control for exploration and exploitation capabilities of the search space in an ACO algorithm, by dynamically adapting the global pheromone decay parameter using fuzzy logic controller (FLC). To this end, they used diversity and iteration metrics as inputs of the Fuzzy system, in order to measure the algorithm performance, and the parameter was considered as output. As an addition to Olivas et al approach, In [13] authors proposed an evolved Ant Colony System algorithm by dynamically adapting the local pheromone decay parameter using fuzzy logic controller. The inputs for their fuzzy system are the same as in Olivas proposed method. Besides the adaptation of ACO parameters, fuzzy logic was applied in other metaheuristic algorithms. Such as [14], where Valdez et al defined a hybrid particle swarm optimization algorithm with genetic algorithm which uses fuzzy logic system for parameter adaptation and decision making. To do so, they proposed three fuzzy systems; the first one gives decisions about the best results of the FPSO + FGA, while the two seconds are responsible of varying the values of the crossover, the mutation, the social acceleration, and the cognitive acceleration parameters.
In [15] a fuzzy logic method was proposed to improve the convergence and the dispersion of the population in PSO algorithm by dynamically adapting the cognitive and the social factors, using three Fuzzy Systems which takes the average error, the diversity of the swarm and the iterations of the algorithm as performance measures. Sombra et al. [16] developed a Fuzzy Logic approach to update the alpha parameter of a gravitational search algorithm (GSA) based on the exploration and exploitation abilities. Three fuzzy rules were modelled according to the elapsed iterations. The main idea is that alpha should be set to a low In [17] Lalaoui et al proposed a fuzzy logic controller to adapt the neighborhood structure of simulated annealing dynamically. The main goal of their work, is avoiding a premature convergence or stagnation by balancing between the exploration and exploitation. In [18] authors proposed a hybridization between genetic heuristic and fuzzy logic algorithm applied in wireless sensor networks, in the purpose to minimize the energy consumption by choosing an optimal number of cluster heads. Beside the use of FLC as a controller of parameters, other machine learning algorithms have been proposed by several researchers for the same purpose. We can cite the following works [19][20][21][22][23][24][25][26][27][28][29] as examples.
In this paper, our contribution consists on proposing an online dynamic adaptation of local and global pheromone decay parameters using the fuzzy logic controller (FLC) according to some performance measures, then a comparison between those adaptations was undertaken to study the behaviour of ACS-TSP during this update. The most important feature of this contribution is reflected in the automation of the proposed mechanism. Also, the online property of the proposed adapter allows it to learn while solving the instances, so that there is no need to waste time on training.
The remain of this paper is organised as follows: In section 2 we describe the proposed method. The experimental results are discussed in section 3. Finally, in Section 4 conclusions and future work are presented.

RESEARCH METHOD
Several metrics have been proposed in fuzzy logic systems as fuzzy set to perform a dynamic parameter adaptation in ACO algorithms. In this paper, our contribution consist in the dynamical adaptation of ACS' decay parameters, based on the performance measures used in ant colony optimization with parameter adaptation using fuzzy logic for TSP problems proposed by Olivas et al., in which they used elapsed iterations described in (5), and diversity of ant colony described in (6), as metrics to measure the diversification and the intensification abilities in the search space.
Where, Current iteration is the number of passed iterations, and total of iteration is the total number of iterations required for testing the algorithm, m is the size of colony, i is the index of the ant, n is the number of dimensions, j is the number of the dimension, xij is the j dimension of the i th ant, ̅ is the j dimension of the current best ant of the colony. In addition to the dynamic adaptation for the global decay parameter performed by Olivas et al, we developed a fuzzy system to adapt the local decay parameter dynamically. The proposed (FLC) consists of three main parts: Fuzzification, Rule Inference, and Defuzzification.

Fuzzification
To convert the crisp input variable to fuzzy value, we used the Mamdani triangular membership functions described below. This process called Fuzzification and it allows the inputs (Iteration and Diversity) and outputs ( and ) variables to be quantified in linguistic terms. In this paper, three terms are defined to qualify the inputs, which are: Low, Medium, and High. So we can write, Iteration = {Low, Medium, High} and Diversity = {Low, Medium, High} as set of decompositions for the linguistic variables. Where, Low = [0, 0.5], Medium = [0, 1], and High = [0.5, 1]. The Fuzzification process simplifies the application of rules to describe the system in a simple manner [30][31][32]. In this work we used a Triangular MFs which is considered as a linear membership function. The choice of this type of MFs is due to its simplicity of implementation and efficacy of computation [33]. The purpose from the membership functions is to transform fuzzy linguisticterms into non-fuzzy input values and vice versa.
In Figure 1 the iteration input variable is mapped to three triangular membership functions with a range from 0 to 1 is illustrated. In Figure 2 the Diversity input variable granulated into three triangular membership functions is shown with a range from 0 to 1. In Figure 3

Rule inference
For the rule inference step, we used a Mamdani's fuzzy conjunction fuzzy rule which is based on IF-Then rules [34,35]. In fact, we have been inspired in the construction of the fuzzy rules for the parameter from Olivas et al., then we have developed our own rules for the parameter based on the rules of parameter and the previous knowledge that plays an opposite role to the parameter, thus, when Iteration is "Low" we are on earlier state and when the Diversity is "Low" the ants are so near to the best ant, so we need to more exploration by setting in a "Low" value. And when Iteration is "high" and Diversity is "high", that is mean we are in advanced states and ants are so spread, so we need to exploit the previous information collected by ants by setting to a "high" value. Table 1 and Table 2 present the rules of the proposed fuzzy system to control and parameters respectively, with iteration and diversity as inputs.  To evaluate and combine the results of the individual fuzzy rules, the Min fuzzy set operator is used, Knowing that we are using the Mamdani's conjunction operation (AND).
where, i is the index of the rule, j and k are indices for x and y of the fuzzy sets {Low, Medium, High}. After that, the results of those rules are summed to produce a set of fuzzy outputs. In the fuzzy system in Figure 4, the output variable and the output variable have five triangular membership functions with Iteration and Diversity as inputs. In fact, the fuzzy system shown in Figure 6 represents the two proposed fuzzy adaptors for pheromones parameter and . The only difference between them consists in the development of the nine rules.

Deffuzification
The output variable is obtained as a linguistic term from the brevious step, so we need to transform it into a crisp value, in a way that is fits the derived fuzzy values of the linguistic output variable. There are several methods that can be used for the defuzzification process for example: Center of gravity method, mean of maximum (MOM) method, and the height method. In our work, we have used the center of gravity algorithm described by (5) to defuzzify the obtained results:

RESULTS AND ANALYSIS
In this section we give the results from studying the behaviour of ACS during this adaptation. To this end, we tested it on several TSP benchmark instances. First, we update just the local pheromone decay parameter , then an adaptation of the global pheromone decay parameter is performed, finally we adapt both parameters simultaneously.

Experiment setup
The most common used benchmark TSP instances used in the literature are chosen as a set of experimental instances in this study, which were selected from the TSPLIB [36]. The instances have been run 30 times Successively on MATLAB [37], 1000 iterations each time, where the initial position of all ants is chosen randomly on all experiments, with the proven best values of ACS algorithm parameters: =2, =0.1, and, q0=0.9 [38]. Table 3 gives the sizes and the best known lengths for the chosen TSP instances used in this experiment.   Table 4 gives the minimum and average lengths over the 30 runs described previously for each instance, also the CPU time is shown. The meaning of the used notations in Table 4 are as follows: -Fuzzy local is the result from applying the proposed (FLC) to the ACS-TSP algorithm, in order to adjust the local pheromone decay parameter . -Fuzzy global is the result from applying the proposed to the ACS-TSP algorithm, in order to adapt the global pheromone decay parameter . -ACS is the result from running the standard ant colony system algorithm with fixed parameters. -Fuzzy is the result from applying the proposed algorithm(FLC) to the ACS-TSP algorithm for adjusting both local and global pheromone decay parameters simultaneously. The analyse of the obtained results can be discussed from two levels: the accuracy of solution level, and the processing time level. For the accuracy of solution level, it can be noticed from the Table 4 that the Fuzzy local could achieve better results when comparing to the other methods especially at the average lengths, with exception in the two first instances, which are considered as the easiest problems, it can not achieve the best average. Moreover, in the minimum lengths the fuzzy local outperforms the other methods in almost instances, with exception in ch130.tsp and eil76.tsp problems. It can be noted that the Fuzzy local algorithm can offer better results whenever the size of the problem becomes larger. The obtained results clarify the goal behind the introduction of local pheromone rule that is represented in the avoidance of falling in local optimum, and continuing to search for better solutions from iteration to another. With the suitable value of local pheromone decay parameter, the proposed fuzzy local algorithm reaches better solutions by guiding ants towards exploring new search area. Fuzzy global and fuzzy themselves use the local pheromone rule with fixed value of pheromone decay parameter, but in spite of this they did not obtain solutions as good as fuzzy local algorithm. This result can be explained by the effect of choosing the appropriate value of pheromone decay parameter using the parameter adaptation parameter mechanism.

Comparison on the solution accuracy
For the amount of time required for testing the algorithms, we can not assume which algorithm gives better solutions, since that the obtained results for the CPU time are so various. We can observe from the Table 4 that the Fuzzy global alternative recorded the lowest CPU four times with nuance compared to the fuzzy local which recorded the less processing time thrice. While, the ACS achieved the best CPU only once and the Fuzzy recorded the best processing time twice.

Comparison on the convergence speed
We can notice from the Figure 5 that fuzzy local method converge faster to the best results compared to the other methods. However, we can observe from the Figure 6 that the fuzzy local method converges lately compared to the other methods but to the best result. So, we can say that, when other methods achieve a better processing time, the solution accuracy of their results is not better. This outcome can be explained by the importance role of the local pheromone rule in general and the local pheromone parameter in particular to avoid trapping into local optimum solution, which may lead to stagnation, so the better known solution might not be found. Thus, an adequate setting of local pheromone decay parameter can improve the performance of the algorithm by encouraging ants to forget bad solution and look for new ones. In Figure 7, as it is observed from Table 4, the fuzzy global method achieves best results compared with the other methods. The Figure 8 shows best results for fuzzy local, thus it converges faster than the other methods.

Statistical test
The T-test is used as a statistical test in this case to compare the fuzzy local with the other methods. And the parameters used for the tests are: the results of running the algorithm 30 times for each TSP instance, the null hypothesis ( H0: 1 ≥ 2) says that the Fuzzy local approach achieves greater average lengths compared with the other methods, and the alternative hypothesis ( H1: 1 < 2) says that the average lengths of the Fuzzy local method are better compared with the other methods, the level of significance is 5%, and the critical value t0= -1.699. The rejection region is for the range of values lowers than -1.699 of T-Test. Table 5 reports the p-value from comparing the proposed fuzzy local method with fuzzy global, standard ACS and fuzzy methods.

CONCLUSION
In this paper, we have studied the behaviour of ant colony system algorithm during a dynamical adaptation of the local and global pheromone decay parameters using the proposed logic controller method. The obtained results from testing this approach on the travelling salesman problem instances confirmed that updating the local pheromone decay parameter can evolve the performance of the standard ACS to achieve better solutions when comparing to other methods. In other words, we can say that the local pheromone decay parameter has a crucial role to find new best solutions. In our future works, we will give other metrics to represent the exploration and exploitation capabilities in ant colony system. Interest will be focused on problems of big size and comparison with the state of art will be presented.