A Genetic Solution to the Traveling Salesman Problem - PowerPoint PPT Presentation

About This Presentation
Title:

A Genetic Solution to the Traveling Salesman Problem

Description:

Create an algorithm that can find near-optimal solutions for symmetric TSPs. ... Create a graphic Interface to run the algorithms and visualize the set of points. ... – PowerPoint PPT presentation

Number of Views:111
Avg rating:3.0/5.0
Slides: 18
Provided by: ryanh59
Learn more at: https://www.tjhsst.edu
Category:

less

Transcript and Presenter's Notes

Title: A Genetic Solution to the Traveling Salesman Problem


1
A Genetic Solution to the Traveling Salesman
Problem
Ryan Honig
2
What is the Traveling Salesman Problem?
Traveling Salesman Problem (TSP) Definition
Given a set of points, find the shortest path
that visits each point exactly once and returns
to the starting point.
3
What is the Traveling Salesman Problem? (Cont.)
Two Types of Problems Symmetric Asymmetric
4
What is the Traveling Salesman Problem? (Cont.)
Symmetric
A
B
Distance 100
Distance 100
5
What is the Traveling Salesman Problem? (Cont.)
Asymmetric
A
B
Distance 100
Distance 200
6
My Goal
  • Three Things I want to do
  • Create an algorithm that can find near-optimal
    solutions for symmetric TSPs.
  • Build off of the first algorithm to allow it to
    find near-optimal solutions for asymmetric TSPs.
  • Create a graphic Interface to run the algorithms
    and visualize the set of points.

7
Genetic Algorithm
Genetic algorithm an algorithm that has a pool
of solutions, and will at random pick two
solutions and combine them to create a child
solution, then a fitness function is used to rank
the solutions
8
Genetic Algorithm (Cont)
Parent A
Parent B
A
A
B
B
C
E
E
C
D
D
9
Genetic Algorithm (Cont)
Combined Path
B
A
B
A
A
B
A
B
E
B
C
A
A
B
D
10
Genetic Algorithm (Cont)
Child
B
A
B
A
B
E
C
A
B
D
11
What Ive done this quarter
  • Fixed the bugs in my basic genetic algorithm so
    that it actually ran
  • Added in mutations so that the pool doesnt get
    filled with entirely the same path
  • Added a heuristic to generate the initial pool
    rather than have it be randomly generated

12
Mutations
  • Chance of 1 in 50 to introduce a mutation to the
    next generation (the child if it replaces a
    parent, or the first parent)

R1
R2
E
B
F
D
G
A
C
E
A
G
D
F
B
C
13
Pool Creating Heuristic
A
A
B
A
E
A
B
A
B
A
A
B
C
E
E
D
D
14
Pool Creating Heuristic (Cont)
  • I tested the program with the heuristic to
    initialize the pool against the program that has
    a random pool, and although the results are
    slightly better (errors from best known solution
    around 4-4.5 rather than about 5, it runs a lot
    slower.
  • Im not sure if I should try and develop a new
    heuristic to use or just continue using the
    random pool program.

15
The Future of my Program
  • Try and find a new heuristic to use to initialize
    the pool
  • Make the program compatible with asymmetric TSPs
  • Make a GUI

16
Plans for a GUI
  • Allow user to input the name of the file
    containing the set of points
  • Display the set of points in a graphical
    representation, along with some the path that the
    algorithm will find for it
  • Allow the user to instead of reading a set of
    points from a text file, click to create points
    on the graphical representation to have the
    algorithm run on

17
THE END
Any Questions?
Write a Comment
User Comments (0)
About PowerShow.com