Genetic Algorithm Assignment

Due February 18th, 1999 at 4:00 PM

Objective:

    You and your team (of up to 4) are to implement a Genetic Algorithm  to solve certain problems from the traveling salesperson domain.  You will examine and report on the effects of varying different parameters and changing the mechanims of crossover. As before, you are allowed to use the programming language of your choice to solve this problem.

Introduction:

The traveling salesperson problem is stated as:
 
 A salesperson must take a trip to each of a set of N cities. Not enjoying traveling, the salesperson wishes to visit each city only once and minimize the total distance that is travelled. In the most general version and the version we shall use, travel can occur between any two cities and the distance between any two cities is symmetric. The salesperson should finish in the same city that was started from intially.

I have provided 5 different data files to work with for this problem which are formatted as follows.

Here are the data files you will use. (You should feel free to construct simpler examples for testing of your code).

You will create 4 different algorithms by which to solve this problem.

Greedy Search

The remaining 3 are all Genetic Algorithms varying only in the type of crossover performed. I will first describe the general GA that I wish you to implement and then I will describe each of the three variations.

Genetic Algorithm

Simple CrossOver

Partially Matched Crossover (PMX)

Knowledge Based Crossover

For each Algorithm you have created do the following

  1. Get baseline fitness values from the greedy algorithm by making 5 tours from random start cities for each data file
  2. Solve each example file 5 times for each GA algorithm and record the average fitness of the best solution from each run
  3. Record average fitness for each of the GA algorithms for each of the following set of parameters listed as (crate, mrate, popSize, gens)
    1. (.8,.2,,50,200)
    2. (.8,.2,100,200)
    3. (.8,.2,200,200)
    4. (.8,.2,300,200)
    5. (.8,.05,200,200)
    6. (.8,.4,200,200)
    7. (.8.6,200,200)
    8. (.8,.8,200,200)
    9. (.4,.2,200,200)
    10. (.2,.2,200,200
    11. (1,.2,200,200)
    12. (0,.2,200,200)
  4. Answer the following questions
    1. Which algorithm consistently performed best? Hypothesize reasons for this behavior.
    2. What were the effects of each of the 3 parameters you modified? Using this knowledge can you come up with a set of parameter values that produces better results for each problem. Why or why not?
  5. Extra Credit: What happens if you start each of the GA's with a random population generated by the greedy algorithm?
Turnin: