Pune Institute of Computer Technology,
Dhankavdi,Pune
DEPARTMENT OF COMPUTER ENGINEERING
A
Project Report
On
“Travelling Salesman Problem using Genetic Algorithm”
Submitted by
Gautam Kothari (41232)
Madhulika Sawant (41237)
Omkar Mankar (41239)
In partial fulfillment of
BACHELOR OF ENGINEERING
In
Computer Engineering
Savitribai Phule Pune University, Pune
INTRODUCTION
Given a asset of cities and distance between every pair of cities, the travelling salesman
problem is to find the shortest possible route that visits every city exactly once and returns to
the starting point. The problem is solved using genetic algorithm and displays a plot of the best
route found.
OBJECTIVE
To Apply Genetic Algorithm for given TSP problem.
H/W AND S/W REQUIREMENTS
Hardware Requirements: PIV, 2GB RAM, 500 GB HDD, Lenovo A13-4089Model
Software Requirements : Anaconda with Python 3.7
THEORY CONCEPTS
These algorithms can be implemented to find a solution to the optimization problems
of various types. One such problem is the Traveling Salesman Problem. The
problem says that a salesman is given a set of cities, he has to find the shortest
route to as to visit each city exactly once and return to the starting city.
Approach: In the following implementation, cities are taken as genes, route to be
followed is the chromosome. The fitness score which is equal to the inverse of
path length of a given route.
Operators Used:
1. Selection – Tournament selection without replacement
2. Crossover – Order crossover with window size 3
3. Mutation – Swap mutation
Algorithm:
1. Initialize the population randomly.
2. Determine the fitness of the chromosome.
3. Until done repeat:
1. Select parents.
2. Perform crossover and mutation.
3. Calculate the fitness of the new population.
4. Append it to the gene pool.
Advantages of GA’s
• Does not require any derivative information (which may not be available for many real- world
problems).
• Is faster and more efficient as compared to the traditional methods. • Has very good parallel
capabilities.
• Optimizes both continuous and discrete functions and also multi-objective problems. •
Provides a list of “good” solutions and not just a single solution.
• Always gets an answer to the problem, which gets better over the time.
• Useful when the search space is very large and there are a large number of parameters
involved.
Limitations of GA’s
• GAs are not suited for all problems, especially problems which are simple and for which
derivative information is available.
• Fitness value is calculated repeatedly which might be computationally expensive for some
problems.
• Being stochastic, there are no guarantees on the optimality or the quality of the solution.
• If not implemented properly, the GA may not converge to the optimal solution.
SCREENSHOTS
CONCLUSION
Hence ,Successfully studied and practically implemented Travelling Salesman Problem and
learnt Genetic Algorithm for optimization.