Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrdiamonddirt/travelingsalesman
A Visualisation and Exploration of the traveling Salesman Problem
https://github.com/mrdiamonddirt/travelingsalesman
canvas javascript logistics traveling-salesman-problem
Last synced: 7 days ago
JSON representation
A Visualisation and Exploration of the traveling Salesman Problem
- Host: GitHub
- URL: https://github.com/mrdiamonddirt/travelingsalesman
- Owner: mrdiamonddirt
- Created: 2023-08-15T18:12:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-15T18:21:44.000Z (over 1 year ago)
- Last Synced: 2024-05-01T20:37:26.247Z (7 months ago)
- Topics: canvas, javascript, logistics, traveling-salesman-problem
- Language: JavaScript
- Homepage: https://mrdiamonddirt.github.io/travelingsalesman/
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Traveling Saleman Problem
## Introduction
a little project i made with my son to learn and visualize the traveling salesman problem.
Overview of the Problem:
The traveling salesman problem is a problem in which a salesman has to visit a number of cities. The salesman wants to visit each city once and return to the starting city. The salesman wants to find the shortest path to visit all the cities.The Amount of possible paths is the number of cities factorial. For example, if there are 5 cities, there are 5! (5 factorial) possible paths. 5! = 5 * 4 * 3 * 2 * 1 = 120 possible paths.
## Files
### BruteForce- `index.html` - the main html file
- `script.js` - the main javascript fileShows a visualization of the traveling salesman problem. The cities are randomly generated and the path script runs until the best path is found using a Brute Force Algorthm. The best path is then shown in red.
shows the number of possible routes, the number of routes checked, and the time it took to find the best path.
### Nearest Neighbor
- `index.html` - the main html file
- `script.js` - the main javascript fileShows a visualization of the traveling salesman problem. The cities are randomly generated and the path script runs until the best path is found using a Nearest Neighbor Algorthm. The best path is then shown in red.
shows the number of possible routes, the number of routes checked, and the time it took to find the best path.
## TODO
- [ ] add more algorithms in seperate folders
- [x] nearest neighbor
- [ ] improve minimum spanning tree
- [ ] improve genetic algorithm
- [ ] add simulated annealing
- [ ] add ant colony optimization