Skip to content

RatulGhosh/TSP-with-BnB-and-Genetic-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solving Travelling Salesman using Branch & Bound and Genetic Algorithm

Setup:

install python > 3.6
git clone https://github.com/RatulGhosh/271_AI_Project.git
cd TSP-with-BnB-and-Genetic-Algorithm
pip install -r requirements.txt

############# IMPORTANT #################
     Edit variable value for `base_dir` in both 'bnb.py' and 'TSP_genetic.py' to set path for the base_directory that contains the input files.
     Line '141' for 'bnb.py'
     Line '17' for 'TSP_genetic.py'
#########################################
  
#to run the Branch & Bound
python bnb.py
#to run the Genetic Algorithm
python TSP_genetic.py

For live code demo use the below link:

Open In Colab

The diagrams below show the progressing of the Genetic Algorithm.

Alt Text

Alt Text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages