Question: 3. (25 points) Apply the genetic algorithm to a TSP with 10 cities. Let the population size be 10. Start with random solutions. Use random

 3. (25 points) Apply the genetic algorithm to a TSP with

3. (25 points) Apply the genetic algorithm to a TSP with 10 cities. Let the population size be 10. Start with random solutions. Use random keys for your solution encoding to overcome the duplication issue during crossover. Let me be 10. At each iteration randomly choose two solutions as parents and a crossover point, and then generate two children. Keep the population size constant at 10, i.e. discard the worst two solutions at the end of each iteration. Also at the end of each iteration, apply-with 5% probability, i.e. not always- a mutation operator to a randomly chosen solution. The mutation operator you should apply should simply interchange two randomly chosen cities in the solution. Make sure to provide all the details of the algorithm: initila population, chosen parents at each iteration, crossover points at each iteration, produced children at each iteration, applied mutation at each iteration (if any), discarded solutions, all of the generated random numbers. Moreover, provide a table hat shows the best and worst solution value at each iteration, and the incumbent. Also make sure to provide your distance matrix. Remember that the total traveling distance should include the return trip to the origin form the last visited city. You may solve this question in Excel for convenience

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!