Giter Club home page Giter Club logo

sample-travelling-salesman's Introduction

sample-traveling-salesman-problem

Alt text

The traveling salesman problem is a popular subject when discussing NP-hard problems. A screenshot of the VIKTOR app is shown in the figure above. There are a lot of different approaches to solving this problem. The goal of this app is to showcase some of these approaches inside the VIKTOR environment. While no new approach is developed in this app, the app will allow you to play with the different algorithms so you can try to get the best solution for a generated topology.

2-opt

The first and easiest algorithm to be implemented in this app is the 2-opt local search algorithm. This algorithm detects if the route crosses over itself and if it does it tries to reorder itself so that it does not.

Genetical Algorithm

The Genetical Algorithm (GA) is an evolutionary algorithm that is based on Charles Darwin's theory of natural evolution. After initializing the population (which is defined as different possible routes) we select the fittest individuals and combine them to get new, and hopefully better, solutions. We can also implement random mutations in the population. This is helpful because otherwise there is a chance that the solution will never improve. After all, we keep having the same individuals when breeding.

Self-organizing maps

The self-organizing maps algorithm implements a neural network that is closely related to the topology we generate. The purpose of the technique is to represent the model with a lower number of dimensions while maintaining the relations of similarity of the nodes contained in it. The algorithm used in this app generates a circular array of neurons, behaving as an elastic ring. During the execution of the algorithm, the neurons are searching for cities closest to their neighborhood. The ring then warps around the cities. To ensure convergence we can add a learning rate to the algorithm. The higher the rate the more the neurons will move, but we might want to make the algorithm less aggressive the longer it runs. Because of this, we can also add decay to the learning rate.

App structure

This is an editor-only app type.

sample-travelling-salesman's People

Contributors

ddijkhuizen avatar khameeteman avatar luukboot avatar mslootwegviktor avatar puijterwaal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.