Question: Artificial Intelligence: This assignment is related with Travelling Salesman Problem (TSP), which aims to find a minimum-distance path between a set of cities that a

Artificial Intelligence:

This assignment is related with Travelling Salesman Problem (TSP), which aims to find a minimum-distance path between a set of cities that a salesman might follow on a business trip. The best path is the path that has the shortest total round-trip distance--from an arbitrary starting city, though all other cities, and back to the starting city. Unfortunately, finding the best path is an NP-complete problem. The TSP has applications in robotics, manufacturing, transportation and many other areas. In this assignment, we target to develop a GA-based solution for TSP problem.

Details of GA-Based Solution

Initialization: The population is initialized randomly.

String Representation: We will consider path representation where the order in a solution defines the order that the traveling salesman will visit the other cities.

Fitness Function: It is defined as the total distance of travel represented by the order of cities. Note that we consider a closed TSP where it will begin and end to the same city.

Population Size: You can try any population size.

Crossover Operator: Use any crossover that you will think it is suitable for this problem.

Mutation Operator: Use any one. Swap mutation (SM), insert mutation (IM) and inversion mutation (RM).

Parent Selection: Use any selection mechanism. You can select more than 2 parents, for example 4, 6, or 8.

Survivor Selection: You will implement a steady-state GA, where entire population is not changed at once, but a part of it is changed. The offsprings will be written in place of the worst individuals of the population.

Termination Condition: It will terminate after 1000, 2000 and 5000 generations.

Programming Language that you can use is Python.

Cities Coordinates

TYPE : TSP problem DIMENSION : 101 num x y 1 41 49 2 35 17 3 55 45 4 55 20 5 15 30 6 25 30 7 20 50 8 10 43 9 55 60 10 30 60 11 20 65 12 50 35 13 30 25 14 15 10 15 30 5 16 10 20 17 5 30 18 20 40 19 15 60 20 45 65 21 45 20 22 45 10 23 55 5 24 65 35 25 65 20 26 45 30 27 35 40 28 41 37 29 64 42 30 40 60 31 31 52 32 35 69 33 53 52 34 65 55 35 63 65 36 2 60 37 20 20 38 5 5 39 60 12 40 40 25 41 42 7 42 24 12 43 23 3 44 11 14 45 6 38 46 2 48 47 8 56 48 13 52 49 6 68 50 47 47 51 49 58 52 27 43 53 37 31 54 57 29 55 63 23 56 53 12 57 32 12 58 36 26 59 21 24 60 17 34 61 12 24 62 24 58 63 27 69 64 15 77 65 62 77 66 49 73 67 67 5 68 56 39 69 37 47 70 37 56 71 57 68 72 47 16 73 44 17 74 46 13 75 49 11 76 49 42 77 53 43 78 61 52 79 57 48 80 56 37 81 55 54 82 15 47 83 14 37 84 11 31 85 16 22 86 4 18 87 28 18 88 26 52 89 26 35 90 31 67 91 15 19 92 22 22 93 18 24 94 26 27 95 25 24 96 22 27 97 25 21 98 19 21 99 20 26 100 18 18 101 35 35 EOF

Please Provide me the code and details.

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 Accounting Questions!