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:
The diagrams below show the progressing of the Genetic Algorithm.