Skip to content

✈️Solving TSP using Exhaustive Search, Hill Climb and Genetic Algorithm.

Notifications You must be signed in to change notification settings

claesgill/travelling_salesman_problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

✈️Solving TSP using Exhaustive Search, Hill Climb and Genetic Algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages