Social-header

A solution to travelling salesman problem using 1D self-organizing maps.
Explore the docs »

Report bug · Request feature

In this project we will try to solve a traveling salesman problem using unsupervised learning technique - self organizing maps (SOM).

Table of contents

Quick start

There are two ways to run this app:

Status

Documentation Status Maintenance made-with-python pip-version OpenCV-version Pandas-version numpy-version ipythonjupyter-version Matplotlib-version made-with-Markdown contributors Logo Flow-charts

What’s included

Within the download you’ll find the following directories and files, logically grouping the modules in its own packages. You’ll see something like this:

(root folder)/
├── docs/  
├── img/
├── models/ 
|   └── weights/
├── notebooks/ ...
├── src/
|   ├── handler/
|   |   ├── __init__.py
|   |   └── utility.py
|   ├── som/ 
|   |   ├── __init__.py
|   |   ├── som.py
|   |   └── som_1d.py
|   └── main.py
├── Readme.md
└── setup.py

Pre-requisites

This app depends on numpy, matplotlib, OpenCV and pandas libraries. We can setup this up using pip installer or conda virtual environment tool.

Run instructions

To run the app, first finish the pre-requisites mentioned, then

  1. Clone the repo in terminal using following command:
    git clone https://github.com/Sudharsan10/travelling-salesman-problem-neural-network.git
    

    or download github repo as .zip and extract it in the desired location.

  2. In terminal navigate to the root folder abd locate the setup.py file and run the following command:
    python setup.py
    

If every requirement is fulfilled a Pyplot window should open with the dotted line showing the solution for the Travelling salesman problem, example

start-screen

Documentation

Contents:

  1. Introduction
  2. Architecture
  3. SOM Class Methods
  4. SOM_1D Class Methods
  5. Utility.py
  6. Notebooks

1 Introduction

2 Architecture

3 SOM Class methods

4 SOM 1D Class methods

5 Utility.py

6 Notebooks

You find the tsp_som.ipynb in the following dir show below,

(root folder)/
...
├── notebooks/ 
|   └── tsp_som.ipynb
...

With this file you can tweak the main section code or if needed with actual algorithm as per your desire to modify or experiment with custom code and see the outputs.

Bugs and feature requests

Have a bug or a feature request? Search for existing and closed issues, if your problem or idea is not addressed yet, please open a new issue.

Creators

@Sudharsan : www.iamsudharsan.com

Thank you for visiting our Repo!