Skip to content

moharastegaran/Solving-TSP-problem-using-GWO-in-python

Repository files navigation

Solving TSP problem using GWO in python

This python based code represents an algorithm based on Grey Wolf Optimizer (GWO) for solving the Traveling Salesman Problem (TSP), which is called (GWO-TSP).

Run Locally

Clone the repo

  git clone https://github.com/moharastegaran/Solving-TSP-problem-using-GWO-in-python.git

Go to the project directory

  cd Solving-TSP-problem-using-GWO-in-python

Once you cloned the repo, you'll have to need to install missing libraries using pip

  pip install numpy
  pip install matplotlib

And you're good to go. Run GWO_TSP.py to plot graph as result of solving problem.

Test Results

Here are some random results of plotting distances for traveling salesman between six cities. As you see results obtained from GWO algorithm are not the best optimal solutions, but they produce acceptable results.

alt testresults

About

This code represents an algorithm based on GWO for solving the TSP problem.

Resources

Stars

Watchers

Forks

Languages