Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started