# diego-vicente/som-tsp

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/diego-vicente-som-tsp).**

3,943 stars · 602 forks · Python · mit

## Links

- GitHub: https://github.com/diego-vicente/som-tsp
- Homepage: https://diego.codes/post/som-tsp/
- awesome-repositories: https://awesome-repositories.com/repository/diego-vicente-som-tsp.md

## Topics

`self-organizing-map` `som` `traveling-salesman` `tsp` `tsp-approximation` `tsp-problem`

## Description

som-tsp is a combinatorial optimization tool designed to solve the Traveling Salesperson Problem using a neural network approach. It functions as a solver that approximates the shortest possible route to visit a set of coordinate-based city locations exactly once and return to the starting point.

The system employs a neural network architecture combined with circular array encoding to determine route paths. It includes a visualization system that generates graphical maps and distribution charts to analyze the efficiency and layout of the calculated route solutions.

The tool provides utilities for parsing coordinate data from standard library files to prepare city locations for optimization. It transforms these raw inputs into numerical tensors for processing and renders the final results as two-dimensional line plots.

## Tags

### Artificial Intelligence & ML

- [Route Optimization](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-networks/route-optimization.md) — Uses neural network architectures to approximate optimal paths for complex routing problems.
- [Path Approximation](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-networks/path-approximation.md) — Approximates the shortest route that visits every city exactly once using a neural network. ([source](https://diego.codes/post/som-tsp/))
- [TSP Solvers](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-networks/tsp-solvers.md) — Applies a machine learning approach using neural networks and circular arrays to solve the TSP.
- [Tensor-Based Route Inference](https://awesome-repositories.com/f/artificial-intelligence-ml/tensor-based-route-inference.md) — Calculates the shortest path by performing matrix operations on city feature sets.

### Scientific & Mathematical Computing

- [Combinatorial Optimization](https://awesome-repositories.com/f/scientific-mathematical-computing/combinatorial-optimization.md) — Loads and processes standard problem instances to test the performance of combinatorial optimization algorithms.
- [Traveling Salesman Problem Solvers](https://awesome-repositories.com/f/scientific-mathematical-computing/traveling-salesman-problem-solvers.md) — Implements a solver for the Traveling Salesperson Problem to find the shortest route visiting all locations.
- [Circular Array Encodings](https://awesome-repositories.com/f/scientific-mathematical-computing/circular-array-encodings.md) — Implements circular array encoding to maintain the cyclic nature of the traveling salesperson problem.
- [Coordinate Data Parsers](https://awesome-repositories.com/f/scientific-mathematical-computing/coordinate-data-parsers.md) — Transforms raw text-based library files into numerical tensors for neural network processing.
- [TSPLIB Instance Loaders](https://awesome-repositories.com/f/scientific-mathematical-computing/tsplib-instance-loaders.md) — Parses coordinate data from standard library files to prepare city locations for optimization. ([source](https://diego.codes/post/som-tsp/))

### Graphics & Multimedia

- [Matplotlib](https://awesome-repositories.com/f/graphics-multimedia/chart-generators/matplotlib.md) — Renders calculated routes as two-dimensional line plots using Matplotlib.
- [Route Visualizations](https://awesome-repositories.com/f/graphics-multimedia/visualization-mapping/geospatial-visualizations/icon-based-point-visualizers/route-visualizations.md) — Generates maps and distribution charts to analyze and verify the efficiency of calculated travel paths.
