Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/freetonik/gen_tsp
Simple genetic algorithm for solving the Travelling salesman problem (TSP)
https://github.com/freetonik/gen_tsp
Last synced: about 2 months ago
JSON representation
Simple genetic algorithm for solving the Travelling salesman problem (TSP)
- Host: GitHub
- URL: https://github.com/freetonik/gen_tsp
- Owner: freetonik
- Created: 2015-01-17T12:18:14.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-17T12:21:06.000Z (about 10 years ago)
- Last Synced: 2024-04-14T16:01:36.172Z (9 months ago)
- Language: C
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gen_tsp
This is simple genetic algorithm for solving the Travelling salesman problem (TSP).The problem is as follows. You are given a set of cities (represented as points in the plane with X and Y co-ordinates). The goal is to find the shortest tour that visits each city exactly once, returning in the end to its starting point. Finding the optimal tour is no simple matter. Given just 50 cities, there are more tours possible than the estimated number of atoms in the known universe! Even with the power of GA we are forced, by the difficulty of this NP-complete problem, to settle for "good" solutions instead of the optimum solution.
There are several types of crossover used: partially mapped crossover, injection crossover; and several types of mutation: one point, n-point (user specified) or random-template-based mutation. There is also one tournament selection mechanism based on ranks.