This small project aims to reproduce the ant colony optimization algorithm to solve the traveling salesman problem. This problem consists in finding the best path (tour with the minimum total length) for the travelling salesman, where he passes by all the cities once.
This project was inspired from : https://link.springer.com/chapter/10.1007/0-306-48056-5_9
This project is built in Python and consist of three files :
- data.py, contains three graphes examples ( default one is the benchmark GR17 which is a set of 17 cities, from TSPLIB ).
- functions.py, which have the essential functions used in the ACO algorithm.
- aco.py, the main file which contains the ACO algorithm and global parameters.
- Python 3
- You can change the graph or the global parameters in the file (aco.py) first.
- Simply run aco.py
python aco.py