Skip to content

Solving the Traveling Salesman problem with 49 US Capitals using a genetic algorithm

License

Notifications You must be signed in to change notification settings

jmhummel/Traveling-Saleman-Genetic-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d50dd28 · Oct 13, 2017

History

6 Commits
Apr 4, 2017
Apr 4, 2017
Apr 5, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017
Oct 13, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017
Apr 4, 2017

Repository files navigation

Traveling-Saleman-Genetic-Algorithm

Solving the Traveling Salesman problem with 49 US Capitals using a genetic algorithm

Best solution

Video of the solution evolving over time: https://www.youtube.com/watch?v=7KCLMNRRPN0

This solver utilizes several Google Map APIs:

  • Capitals are converted into geolocations using the Geocoding API.
  • The Distance Matrix API is used in order to calculate driving time between each pair of capitals.
  • The Directions API is used to get the paths of the fastest routes between cities.
  • Lastly, the Static Maps API is used to draw the full solution and cities on a map and save it to disk.