Facebook pixel tracking

The Science and Information (SAI) Organization publishes open-access peer-reviewed journals in computer science and artificial intelligence.

Contact Info
Website thesai.org
Follow Us
Contact Info
Follow Us
Research Article | Open Access |

Q-Learning Guided Local Search for the Traveling Salesman Problem

Author 1: Sanaa El Jaghaoui Author 2: Aissa Kerkour Elmiad
International Journal of Advanced Computer Science and Applications (IJACSA) · Vol. 16, No. 12 · Published 2025

DOI: https://doi.org/10.14569/IJACSA.2025.01612115

Abstract

The Traveling Salesman Problem (TSP) remains a fundamental challenge in combinatorial optimization with applications in logistics, routing, and network design. Classical local search methods face a trade-off between solution quality and computational efficiency: while 3-opt delivers better solutions than 2-opt, its O(n3) complexity renders it impractical for large instances. This paper presents a reinforcement learning (RL) approach that addresses this challenge through intelligent guidance of local search operators. Our method employs a simple one-dimensional Q-table that learns to identify poorly positioned cities and directs 2-opt and 3-opt operations toward the most promising tour segments. We evaluate the approach on 55 TSPLIB benchmark instances ranging from 51 to 18,512 cities. For instances up to 1,000 cities, RL-guided 3-opt (RL-3opt) achieves optimality gaps of 0.9–2.2% compared to 3.8–4.3% for classical 3-opt, with execution times reduced from hours to under one second and speedups reaching 32,323×. For instances between 1,000–5,000 cities, RL-3opt maintains computational efficiency (100–30,000× speedups) while achieving competitive 6.3% gaps. Both RL-2opt and RL-3opt execute in sub-second to a few seconds even on problems with over 18,000 cities. All experiments run on standard CPU hardware without GPU acceleration, demonstrating that effective TSP optimization remains accessible without specialized resources.

Keywords

How to Cite this Article

Jaghaoui, S. E., & Elmiad, A. K. (2025). Q-Learning Guided Local Search for the Traveling Salesman Problem. International Journal of Advanced Computer Science and Applications, 16(12). https://doi.org/10.14569/IJACSA.2025.01612115

Jaghaoui, Sanaa El, and Aissa Kerkour Elmiad. "Q-Learning Guided Local Search for the Traveling Salesman Problem." International Journal of Advanced Computer Science and Applications, vol. 16, no. 12, 2025, https://doi.org/10.14569/IJACSA.2025.01612115.

@article{Jaghaoui2025,
  title     = {Q-Learning Guided Local Search for the Traveling Salesman Problem},
  journal   = {International Journal of Advanced Computer Science and Applications},
  volume    = {16},
  number    = {12},
  year      = {2025},
  publisher = {The Science and Information Organization},
  author    = {Sanaa El Jaghaoui and Aissa Kerkour Elmiad},
  doi       = {10.14569/IJACSA.2025.01612115},
  url       = {https://doi.org/10.14569/IJACSA.2025.01612115}
}

Open Access — licensed under a Creative Commons Attribution 4.0 International License. Unrestricted use, distribution, and reproduction in any medium, even commercially, as long as the original work is properly cited.