https://github.com/almayor/genetic-tsp
Genetic algorithm for the Travelling salesman problem
https://github.com/almayor/genetic-tsp
genetic-algorithm tsp tsp-solver
Last synced: 2 months ago
JSON representation
Genetic algorithm for the Travelling salesman problem
- Host: GitHub
- URL: https://github.com/almayor/genetic-tsp
- Owner: almayor
- License: mit
- Created: 2020-07-22T20:49:09.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-31T19:04:01.000Z (over 4 years ago)
- Last Synced: 2025-01-30T05:26:43.980Z (4 months ago)
- Topics: genetic-algorithm, tsp, tsp-solver
- Language: Python
- Homepage:
- Size: 2.63 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Genetic Travelling Salesman
### Overview
* A simple genetic algorithm for the [Travelling salesman problem](https://en.wikipedia.org/wiki/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)
