Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 986 Bytes

README.md

File metadata and controls

18 lines (12 loc) · 986 Bytes

The Traveling Salesman Problem (TSP)

Coursework from University of Hertfordshire

Task

The Travelling Salesman Problem (TSP) asks the following question: Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the original city?

I completed a program in Python that is capable of:

  1. Randomly generating a map of locations
  2. Calculating the distance between those locations
  3. Generating a visiting order to find the shortest path
  4. Visualising the path.

The program implements two algorithms, the Nearest Neighbour Algorithm, and the Genetic Algorithm. The Nearest Neighbour algorithm is used to calculate an optimized travel route between all of the locations returning to the starting point. Whereas the Genetic Algorithm is used to solve small datasets (less than 100).

Contact me!

For more information about this project, please email me at mgrosmaninho@hotmail.com