The objective of this project is to develop a working solution to the Traveling Salesman Problem using the Ant Swarm Optimization algorithm.
In addition to implementing a solution, I also wanted to develop a deep understanding of the ASO algorithm – its methods, use-cases, advantages, and disadvantages.
One last personal goal of mine is to include some visualization of the data/results acquired from runs of the solution. Example:
Notes:
- This project will be using slightly modified source code from another project of mine solving the TSP using a genetic algorithm. Any modifications will be discussed.
The project has the following baseline requirements derived from the problem description:
- The solution must generate a list of cities.
- The solution must generate a list of distances between each city and all others.
- The solution must find the shortest path between all cities.
- All cities, except the origin city, must be visited exactly once.
- The solution must start and end at the origin city.
In addition to the baseline requirements, the following requirements assist in creating a good testing environment for the genetic algorithm :
- At least 25 cities must be generated.
- All cities must reside within a 200*200 unit plane. The units can be interpreted as kilometers.
- All cities must be generated at random coordinates (overlap possible, but highly improbable).
Lastly, each design choice is explained within the context of the problem.
"If you can't explain it to a six-year-old, then you don't understand it yourself" (Einstein).
The project requires Jupyter Notebook and Matplotlib to modify.
Python Version: <= 3.6
See requirements.txt
for full requirement list.
If used as "inspiration," please link back to this repo.
Thanks,
- Kay