Coder Social home page Coder Social logo

tsp-sa's Introduction

TSP-SA

TSP-SA is a program, written in C++, which (tries to) solve the Travelling Salesman Problem, aka TSP.

TSP is regarded as 'The Holy Grail of Computer Science'. The problem consists of a certain number of cities and the task is the find the shortest Hamiltonian Cycle, connecting all the cities.

The algorithm used here is Simulated Annealing, aka SA. SA is a randomized algorithm and hence may not give the same output for the same input at successive executions. This is an anytime algorithm and hence it would find better and better solutions the more time it keeps running.

Executing the program

The program has been tested successfully for an input of at most 500 cities. The user may terminate the algorithm any time he/she desires.

To generate the executable, type 'make' at the terminal. An executable 'tsp-sa' gets created.

To run the executable, type 'executable-name < input-file-name'. For example, './tsp-sa < reuc_250'.

Some sample input files are available in the folder 'sample-input-files'. The input files have been created from TSPLIB (http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/).

This was developed as part of my assignment in course CS6380 - Artificial Intelligence, IIT Madras under the guidance of Prof. Deepak Khemani.

tsp-sa's People

Contributors

kevinalexmathews avatar

Stargazers

harshal28g avatar Eric_Wangyz avatar

Watchers

James Cloos 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.