Hybrid of Ant Colony Optimization (ACO) and Tabu Search (TS) Algorithm to Solve the Traveling Salesman Problem (TSP) 1st Rico Wijaya Dewantoro, Computer Science Department, Faculty of Computer Science and Information Technology, Universitas Sumatera Utara, Jl. Dr. Mansur No.9, Padang Bulan, Medan, [email protected] 2nd Poltak Sihombing, Computer Science Department, Faculty of Computer Science and Information Technology, Universitas Sumatera Utara, Jl. Dr. Mansur No.9, Padang Bulan, Medan, [email protected] Abstract—In this research, we propose the combination of Ant Colony Optimization Algorithm and Tabu Search Algorithm as local search to solve Traveling Salesman Problem. This is a hybrid method of ACO to find the shortest path value and get a better running time. One of the popular case that can be adopted is TSP. We still develop the prototype of the software by using the combination of ACO and TS in order to find the best routes and better running time. In this research, we compare the hybrid of ACO-TS and ACO. The result, we got the best routes and a better running time from hybrid of ACO-TS compared to the ACO itself. It means that combination of ACO-TS is better than ACO itself. Therefore, to get a better running time in solution of TSP and more optimal length of route, we recommended the ACO-TS algorithm than ACO itself. 3rd Sutarman, Computer Science Department, Faculty of Computer Science and Information Technology, Universitas Sumatera Utara, Jl. Dr. Mansur No.9, Padang Bulan, Medan [email protected] pheromones on the way while traveling from the nest to food, in order to communicate with one to another to find the shortest pathway. The ants have to make a decision that they should go left or right, and the choice that is made is an erratic decision. The accumulation of pheromones is faster on the shorter pathway. The difference of pheromones value in each path from time to time makes the ants choose the shortest path based on the number of pheromones on the shortest path [2], [3]. Keywords— TSP, ACO, Tabu Search, Optimization, ACOTS I. INTRODUCTION In the case of the ACO algorithm, theoretical analysis of the run time behavior of ACO has begun and has always been a discussion as a future development so that the ACO algorithm becomes more efficient. In TSP problems, ACO is one algorithm that is often used. ACO is always a topic of discussion from a theoretical perspective because of its behavior[1]. ACO is inspired by the intelligence of ants in the search of the shortest path to food sources. ACO applies an optimization problem solving method based on the principle of communication between ant colonies. Basically, all ants will leave traces of special substances known as pheromones. This pheromone will then be a guideline for other ants in searching. If the shorter the path visited, the less evaporation occurs and the higher the pheromones in the path or track. Ants will tend to move along a track that has a high trace of pheromones. Fig.1 shows, the ant’s colony find the shortest path. In Fig.1 A, the ant colony has to decide that they should to turn left or right randomly because they don’t know which is the best choice. In Fig. 1B, 1C and 1D show, the ants put the secrete XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE Fig. 1. The ants’ colony find the shortest path In the early 90s the ACO algorithm had increased attention by a number of researchers. ACO has solved various of optimization problems such as: traveling salesman problem (TSP), vehicle routing problem (VRP), job-shop scheduling problem (JSP), quadratic assignment problem (QAP), WeaponTarget Assignment problems (WTA) etc [3]. ACO can be also used to provide solutions for difficult optimization problems. Although ACO is able to provide solutions for optimization problems, ACO has problems with stagnation and premature convergence and ACO convergence speeds that are always slow. These problems will become clearer when the size of the problem increases. Therefore, several improvements to the ACO algorithm have been introduced for years. Various adaptations are carried out, such as: dynamic control of solution construction and emergence of local search [4]–[6], new pheromone updating strategies [7], max-min ant system [8], a strategy is to partition artificial ants into two groups: scout ants and common ants[2], using candidate lists strategies [9], [10], dynamic ant colony system with three level updates [11], [12] and using the path selection controlled by information entropy [13] studied to improve the quality of the final solution and continue to lead to improved algorithms. All of these studies that have contributed to optimizing the ACO Algorithm have only reached a certain limit, but have a few obvious effects on increasing the speed of convergence and obtaining global optimal solutions. To improve the performance of the ACO algorithm, we used Tabu Search Algorithm as a local search. The results of the combination of ACO-TS Algorithm show that this combination can improve the performance of ACO algorithm. A simple description of the TSP understanding can be shown in Fig. 2. A YA E C B G YB D F II. THE METHOD XB This paper proposes the combination of the ACO algorithm and Tabu Search algorithm as a local search to solve TSP problems. A. Traveling Salesman Problem (TSP) One of the well-known and widely studied problems in discrete optimization or combination is the Traveling Salesman Problem (TSP) [14]. The TSP can be applied to various activities such as routing. The main problem of TSP is that a salesman must visit a number of cities that are known to be one distance from each other and return to their hometown. A TSP can be defined as follows: there is a set of cities {C1, C2, C3, ... Cn} and d {Ci, Cj} is the distance between cities i and j. The purpose is to find the order π from the following formula to get the most minimal value. (1) XA Fig. 2. The position of the cities to be passed Each city on Fig. 2 has coordinates (x, y), so that the distance of each city can be calculated by formula (2). (2) After the distances that connecting each city are known, then find the shortest route from the path to be passed to return to the initial city is shown in Fig. 3. A E Start The results of the formula are referred to as the length of the journey of the salesman visits the cities in the order π where after visiting all cities, the salesman returned to his hometown. C G There are two kinds of problem in TSP, i.e.: Symmetric Salesman Problem commonly called Traveling Salesman Problem and Asymmetric Salesman Problem. On the Symmetric Salesman Problem, d {Ci, Cj} = d {Cj, Ci}, if Asymmetric Salesman Problems then d {Ci, Cj} ≠ d {Cj, Ci} for 1≤i and j≥n. TSP is one of the optimization problems which is an NPcomplete problem (nondeterministic polynomial complete problem), which is a problem whereby increasing variables linearly, the time to solve the problem increases exponentially. This is also called combinatorial exponential. TSP can be simply defined as the process of finding the most efficient and shortest paths from several cities presented, passing through each of these cities and returning to the initial city. Every city can only be visited once. The problem facing the TSP is how to plan a minimum total distance. To solve this problem, it is not easy to do because there is a search room from a set of permutations in a number of cities, then the TSP is then known as the Non Polynomial problem. B D F Fig. 3. Path in the TSP B. Ant Colony Optimization (ACO) The ACO algorithm was presented by Marco Dorigo. ACO algorithm inspired by the intelligence of ants in the search of the shortest path to food sources. ACO applies an optimization problem solving method based on the principle of communication between ant colonies. Basically, all ants will leave traces of special substances known as pheromones. This pheromone will then be a guideline for other ants in searching. If the shorter the path visited, the less evaporation occurs and the higher the pheromones in the path or track. The ants will tend to move along a track that has a high trace of pheromones. Steps in completing the optimal path search using the ACO algorithm, i.e.: 1. Input the TSP route data set 2. Initialize initial parameters, namely α, β, ρ, τ0 = τij, Q, NC max. 3. Fill in the first node in the tabu list. 4. Preparation of visited routes for each ant in each of the points passed. 5. Visit other nodes that are not in the tabu list based on random proportional rule. The node with the greatest probability is the node to be visited. Then add it to the tabu list. 6. Calculate the number of pheromone in the tabu list. 7. Perform renewal of pheromones in each path and empty the tabs of each ant list. 8. Repeat the fifth process until the sixth process using renewed pheromones as the initial pheromones of each segment or stop the process if the NC max has been fulfilled. 9. Then specify a tabu list with the best value with the highest probability value. C. Tabu Search The Tabu Search algorithm is one of the algorithm that is within the scope of the heuristic method. This algorithm uses short-term memory to keep the search process from being trapped at the local optimum value [15]. We then use the tabu list to store a set of solutions that have just been evaluated. During the optimization process of each iteration, the solution to be evaluated will be matched to the contents of the tabu list in order to see if the solution is in the tabu list or not. If the solution is already in the tabu list, then the solution will not be evaluated anymore in the next iteration. And if there are no more solutions that will become members of the tabu list, then the best value just obtained that this is the real solution. The two components that are very important in the Tabu Search algorithm are the intensification strategies and diversification strategies. Tabu Search can be applied directly to verbal and symbolic statements of various kinds of decision-making problems without the need to change them into a form of mathematical formula. However, it is also useful to use mathematical notation to describe a larger scope of problems as a basis for explaining some things in Tabu Search. Tabu Search characterizes part of the problem with the optimized goal of the function f (x) with x € X, where f (x) can be either linear or non-linear and summary X containing the decision value x. Basically the searches on the tabu search algorithm are the same as ordinary local or neighborhood search, starts the iteration process from one point (solution) to another until the criteria or conditions stop being reached. Each x € X associated with neighborhood N (x) € X and each solution x € N (x) is obtained from x from the operation called move. Fig. 4. Flowchart of ACO Fig. 5. Flowchart of Tabu Search III. IMPLEMENTATION A. ACO-TS Algorithm The objective of this research is to optimize a running time in the ACO Algorithm by using the Tabu Search algorithm as its local search. Fig. 6. Flowchart of ACO-TS B. Data set The data used for this study is a Hassler Whitney TSPLIB95 A280 data set [16]. The data source can be displayed in table 3.1. The data source has 280 points (nodes), namely from C1 to C 280. Each point (node) consists of X (ordinate) and Y (abscissa), for example city 1 (C1) at coordinates X = 288 and Y = 149. Table 1. Data set of Hassler Whitney TSPLIB95 A280 V. CONCLUSION AND FUTURE WORKS Table 2. Data set of Hassler Whitney TSPLIB95 A280 IV. RESULT AND DISCUSSION The results obtained are the best routes based on the closest distance and the best running time as in the Fig.6. and Fig. 7. This research is a part of our ongoing research. So far, we have still develop the prototype of implementation ACO-TS Algorithm in order to know which is the best route in another case. The temporarily result, we got a better running time using ACO-TS compared to the ACO itself. It means that the combination of ACO-TS is better than ACO itself. Therefore, to get a better running time in solution and a more optimal route length, we recommended the ACO-TS algorithm than ACO itself. ACKNOWLEDGMENT The authors would like to thank The Rector of Universitas Sumatera Utara (USU), the Chair of the Research Center of USU, and the Dean of Fac. of Computer Science and Information Technology, for The Research Award. This Research is Supported by “DRPM Kemenristekdikti of Republic Indonesia Year 2019”, under Contract No: 227/UN5.2.3.1/PPM/KP-DRPM/2019. REFERENCES Fig. 6. ACO Algorithm [1] Pan Junjie and Wang Dingwei, “An Ant Colony Optimization Algorithm for Multiple Travelling Salesman Problem,” vol. 2, no. 8, pp. 210–213, 2006. [2] R. Gan, Q. Guo, H. Chang, and Y. Yi, “Improved ant colony optimization algorithm for the traveling salesman problems,” J. Syst. Eng. Electron., vol. 21, no. 2, pp. 329–333, 2014. [3] L. Li, S. Ju, and Y. Zhang, “Improved ant colony optimization for the traveling salesman problem,” in Proceedings - International Conf. on Intelligent Computation Technology and Automation, ICICTA 2008, 2008. [4] H. M. Rais, Z. A. Othman, and A. R. Hamdan, “Improved Dynamic Ant Colony System (DACS) on symmetric Traveling Salesman Problem (TSP),” in 2007 International Conf. on Intelligent and Advanced Systems, ICIAS 2007, 2007. [5] J. Han and Y. Tian, “An Improved Ant Colony Optimization Algorithm Based on Dynamic Control of Solution Construction and Mergence of Local Search Solutions,” in Proceedings - 4th International Conf. on Natural Computation, ICNC 2008, 2008, vol. 7, pp. 490–495. [6] T. N. Bui and M. Colpan, “Solving geometric TSP with ants,” p. 271, 2005. [7] C. M. Pintea and D. Dumitrescu, “Improving Ant Systems using a local updating rule,” in Proceedings Seventh International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, SYNASC 2005, 2005. In Fig. 6. Using ACO Algorithm, we got optimal distance: 188.53 and running time: 0.165 second. Fig. 7. ACO-TS Algorithm In Fig. 7. Using the hybrid of ACO-TS, we got optimal distance: 186.08 and running time: 0.146 second. [8] T. Stützle and H. Hoos, “{{\cal MAX}-{\cal MIN}} {A}nt {S}ystem and Local Search for the {T}raveling {S}alesman {P}roblem,” in Proceedings of the fourth International Conference on Evolutionary Computation, 1997. [9] C. Wang, D.-W. Cui, Y.-K. Zhang, and Z.-R. Wang, “A Novel Ant Colony System Based on Delauney Triangulation and Self-adaptive Mutation for TSP,” 2006. [10] Z. A. Othman, H. M. Rais, and A. R. Hamdan, “Strategies DACS3 increasing its performances,” Eur. J. Sci. Res., vol. 27, no. 4, pp. 488–499, 2009. [11] Z. A. Othman, H. Rais, and A. R. Hamdan, “DACS3 : Embedding Individual Ant Behavior in Ant Colony System,” no. 4, pp. 25–30, 2009. [12] H. Md. Rais, Z. A. Othman, and A. R. Hamdan, “Improvement DACS3 searching performance using local search,” 2009 2nd Conf. Data Min. Optim. DMO 2009, no. October, pp. 160–166, 2009. [13] X. M. Wei, “Improved ant colony algorithm based on information entropy,” in Proceedings - 2010 International Conference on Computational and Information Sciences, ICCIS 2010, 2010. [14] M. Dorigo, “Luca Maria Gambardella Ant Colony System: A Cooperative Learning Approach to the Traveling Salesman …,” Belgium TR/IRIDIA/1996-, vol. 1, no. 1, p. 53, 5AD. [15] M. M.-U.- Rashid Khan and M. Asadujjaman, “A Tabu Search Approximation for finding the Shortest distance using Traveling Salesman Problem,” IOSR J. Math., vol. 12, no. 05, pp. 80–84, 2016. [16] Sitanggang. Delima, “Population Initialization in Genetic Algorithms Using Simple Hill Climbing (Shc) For Traveling Salesman Problem (Tsp),” J. TIMES, vol. 4, no. 2, pp. 40–44, 2016.