Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 870 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 870 Bytes

Solving the Travelling Salesman Problem (TSP)

Algorithms that are tested are the Exhaustive Search, Hill Climb and Genetic Algoritm.

Parameters that can be adjusted inside the main.py file:
number_of_cities number of cities to search trough (0-24)
number_of_swaps number of swaps used to swap cities in the Hill Climb
number_of_generations used for termination condition
population_size the size of the population
number_of_parents prosentage of parents put in the new population
number_of_children prosentage of childes put in the new population
mutation_rate mutation probability

Usage:

Simply run python3 main.py in the terminal.

System and packages:

  • MacOS Mojave
  • Python 3.6.4
    • Numpy
    • Matplotlib
    • Itertools

Inspired to redo this task given in the couse inf3490 at the University of Oslo