Skip to content

YachuJoshi/tsp-simulated-annealing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traveling Salesperson Problem Using Simulated Annealing

Simulated annealing (SA) is a probabilistic technique for approximating the global optimum of a given function. Here, I've tried solving the Traveling Salesperson Problem using Simulated Annealing Algorithm.

To try this, you can either:

  • Clone the repository
  • Download zip

Perform the following:

  1. Install the dependencies:
yarn install
  1. Run dev mode:
yarn dev

You can change the total number of cities inside the code:

const sa = new SA({
  cityCount: 25 // Any arbitrary value
});

Result - 20 Random Cities:

animation