The Comparison of Genetic Algorithm and Ant
Colony Optimization in Completing Travelling
Salesman Problem
Alexander
1
, Haris Sriwindono
2
alexanderujang96@gmail.com
1
, haris@usd.ac.id
2
Department of Informatics, Faculty of Science and Technology, Universitas Sanata Dharma,
Yogyakarta, Indonesia
Abstract. Traveling Salesman Problem abbreviated as TSP, is a NP-hard problem that is often applied in
various applications. TSP is a polynomial problem, so the solution is exponential. One way to improve
the resolution of NP-hard problems is to use probabilistic algorithms such as genetic algorithms, ant
colony optimization algorithms, and others. In this study genetic algorithm (GA) was applied with
ordered crossover method and reciprocal mutation method. And also use the ant colony algorithm (ACO).
This research will compare the performance of the two algorithms. The data used are 10, 20, ..., 100
cities, so the result shows that the ant colony algorithm is able to find a shorter distance than the genetic
algorithm, but the genetic algorithm shows a better speed of completion than the ant colony algorithm.
Keywords : Travelling Salesman Problem, Genetic Algorithm, Ant Colonies Optimization
1 Introduction
Traveling Salesman Problem (TSP) is a well-known optimization problem and is often used to
test the performance of various algorithms. TSP itself is pretty much applied in the real world.
The main problem of TSP is that a salesman must visit a number of cities, with the distance
between cities already known beforehand. Each city can only be visited once and must return
to the city of origin. Travel costs that are considered by the salesman can be in the form of
distance, time, fuel, comfort, and so on. [1]
Various methods are applied to handle TSP problems. The method is divided into two, namely
the conventional method and the heuristic method. The conventional method is a method with
ordinary mathematical calculations, while the heuristic method a technique designed for
solving a problem more quickly when conventional methods are too slow, or for finding an
approximate solution when classic methods fail to find any exact solution. This is achieved by
trading optimality, completeness, accuracy, or precision for speed. In a way, it can be
considered a shortcut. Genetic Algorithm (GA), Ant Colony Optimization (ACO), Particle
Swarm Optimization (PSO), and Soccer Games Optimization (SGO), are some examples of
heuristic method algorithms for optimization [2][3].
ICSTI 2019, September 20, Yogyakarta, Indonesia
Copyright © 2020 EAI
DOI 10.4108/eai.20-9-2019.2292121