Skip to content

Genetic algorithm for the Travelling salesman problem

License

Notifications You must be signed in to change notification settings

almayor/genetic-tsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genetic Travelling Salesman

Overview

  • A simple genetic algorithm for the Travelling salesman problem.
  • < 100 lines of code
  • Achieves reasonable performance for 25, 50, 100 cities
  • Optimal solution isn't guaranteed as the algorithm can get stuck in local minima / be slow to converge, but empirically was found to work well

25 cities

  • Convergence is fast

  • Snapshot of each generation (with freeze on finish)

50 cities

  • Convergence is fast

  • Snapshot of every 10th generation (with freeze on finish)

100 cities

  • Convergence is reasonable

  • Snapshot of every 10th generation (with freeze on finish)

About

Genetic algorithm for the Travelling salesman problem

Topics

Resources

License

Stars

Watchers

Forks

Languages