agarwalrohan189 / Improved-Genetic-Algorithm-for-Travelling-Salesman-Problem

An attempt at improving the Genetic Algorithm employed for solving the travelling salesman problem based on faster convergence and minimum path cost. A basic implementation of the Genetic Algorithm and a short comparative analysis on the performance of the naive and the improved version with possible reasons can also be found alongside.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improved-Genetic-Algorithm-for-Travelling-Salesman-Problem

Content Details:-

The repository contains two files:-

1. Genetic_Algo.py: This file contains the complete python code which can we used to run both 
   the naive and the improved version of the Genetic Algorithm for the Travelling Salesman Problem.


2. Report.pdf: This file contains a brief introduction about the problem, implemenataion details
   and the improvements along with the possible reasons. It also contains a short ananlysis 
   of the results obtained.

Execution Details:-

The code requires the following libraries to be installed. Please run the following snippet in the terminal if not already installed.

>>> pip3 install numpy

>>> pip3 install matplotlib

Run the code by simply navigating to the folder and running the following command:-

>>> python3 Genetic_Algo.py

The code will output the best fitness value for all generations for the given problem. In the end, the graph is plotted for comparison of the textbook version and the improved version. The part for the average performance for multiple runs of the algorithms is commented part in both the functions. The part could be uncommented to analyse the average performance of the algorithms.

Note:- The Textbook version of the algorithm being talked about in the report comes from the book titled 'Artificial Intelligence A Modern Approach, Third Edition' by 'Stuart J. Russell' and 'Peter Norvig'. The pdf can be found easily on the internet.

Contact at agarwalrohan189@gmail.com for any clarifications or discussion on some more improvement ideas.

About

An attempt at improving the Genetic Algorithm employed for solving the travelling salesman problem based on faster convergence and minimum path cost. A basic implementation of the Genetic Algorithm and a short comparative analysis on the performance of the naive and the improved version with possible reasons can also be found alongside.


Languages

Language:Python 100.0%