Shortest route optimization is a classic problem in the field of combinatorial optimization with wide applications in various domains, such as transportation, logistics, and path planning. This research aims to solve the shortest route optimization problem using a genetic algorithm implemented in the JavaScript programming language. Genetic algorithms are metaheuristic methods inspired by the principles of biological evolution, such as natural selection, crossover, and mutation. In this study, the representation of individuals in the genetic algorithm is the sequence of cities visited, and the fitness function is based on the total distance traveled. The initial population is randomly generated, and the evolution of the population occurs through a series of generations by applying genetic operators. The experimental results show that after 200 generations, the genetic algorithm successfully finds a route with a total distance of 26.540475042607596, which is close to the optimal solution. The implementation of the genetic algorithm in JavaScript demonstrates its potential as an effective tool for solving the shortest route optimization problem. However, several suggestions for further development are also discussed, including parameter tuning, alternative selection strategies, variations of genetic operators, hybridization with other algorithms, and visualization of results. This research provides insights into the application of genetic algorithms in shortest route optimization and demonstrates how this technique can be implemented using JavaScript as a popular programming language.
Copyrights © 2025