ONE OF THE METHODS FOR IMPLEMENTING THE ANT ALGORITHM USING THE TRAVELING SALESMAN PROBLEM AS AN EXAMPLE

Authors

DOI:

https://doi.org/10.28925/2663-4023.2025.29.822

Keywords:

optimization problems, ant colony algorithm, pheromones, software design, shortest path

Abstract

In today’s world, optimization problems play a crucial role in logistics, energy systems, industry, finance, healthcare, machine learning, and more. An optimization problem is a mathematical task aimed at finding the best possible solution from a set of feasible options, based on a defined criterion such as minimizing cost or time, or maximizing profit. There are exact methods, such as brute-force search and dynamic programming, which guarantee an optimal solution. However, they become computationally infeasible as the problem size grows. Heuristic and metaheuristic methods – including greedy algorithms, genetic algorithms, and ant colony optimization (ACO) – provide approximate but practically effective solutions for large-scale problems. One classical example of a combinatorial optimization problem is the Traveling Salesman Problem, where the goal is to find the shortest possible route that visits each city exactly once. The ant colony algorithm is one of the most efficient approaches for solving TSP and similar pathfinding problems on graphs. Inspired by the foraging behavior of real ants, the algorithm simulates how ants lay down pheromones along their paths and choose their routes based on the intensity of these pheromone trails and the distance to the next node. Each artificial ant incrementally constructs a solution, and the pheromone levels are updated after each iteration based on the quality of the solutions found. Key algorithm parameters (α, β, ρ) influence route selection, adaptability, and the ability to avoid outdated solutions. This paper presents the design and development of a software tool that generates a graph and implements the ACO algorithm to find the shortest path. The optimization algorithm is implemented using HTML, CSS, and JavaScript. One of the system's key features is real-time visualization: the graph is displayed using the Canvas element, where nodes are rendered as colored circles, and edges as lines whose thickness and transparency reflect the current pheromone intensity.

Downloads

Download data is not yet available.

References

An Overview of Ant Colony Optimization Algorithms for Dynamic Optimization Problems. IntechOpen - Open Science Open Minds | IntechOpen. https://www.intechopen.com/chapters/87285. (2023)

Nosenko V.A. (2018). Heuristic algorithms. Kharkiv: KhNU. 223 p.

Elitist Ant System | Algorithm Afternoon. Home | Algorithm Afternoon. https://algorithmafternoon.com/ants/elitist_ant_system/

Levchenko O.O. (2020). Optimization methods and algorithms. Dnipro: DNU. 340 p.

Ines Alaya, Christine Solnon, Khaled Ghedira. (2020). Ant algorithm for the multidimensional knapsack problem. International conference on Bioinspired Methods and their Applications (BIOMA), Ljubljana, Slovenia. pp.63-72. https://hal.science/hal-01541529/file/bioma04.pdf.

Gavrilyuk V.V. (2018). Algorithms and methods of computational intelligence. Lviv: Ivan Franko National University of Lviv. 312 p.

Corman T. H. (2001). Introduction to Algorithms. Cambridge, Massachusetts : The MIT Press. 1157 p.

Shtovba S. D., Rudy O. M. (2012). Ant optimization algorithms // Information technologies and computer technology. 2012. No. 78. P. 123-130.

Dorigo M., Stützle T. (2026). The ant colony optimization metaheuristic: Algorithms, applications, and advances. Handbook of metaheuristics. https://www.researchgate.net/publication/ 226007381_The_Ant_Colony_Optimization_Metaheuristic_Algorithms_Applications_and_Advances.

Yimeng Yue, Xin Wang. (2015). An Improved Ant Colony Optimization Algorithm for Solving TSP // International Journal of Multimedia and Ubiquitous Engineering Vol.10, No.12, pp.153-164. https://gvpress.com/journals/IJMUE/vol10_no12/16.pdf.

Сучасний підручник з JavaScript. Сучасний підручник з JavaScript. https://uk.javascript.info/.

Downloads


Abstract views: 8

Published

2025-09-26

How to Cite

Khotynskyi, V., & Pavlenko, Y. (2025). ONE OF THE METHODS FOR IMPLEMENTING THE ANT ALGORITHM USING THE TRAVELING SALESMAN PROBLEM AS AN EXAMPLE. Electronic Professional Scientific Journal «Cybersecurity: Education, Science, Technique», 1(29), 274–286. https://doi.org/10.28925/2663-4023.2025.29.822