Question: Using python implement a genetic algorithm for the Traveling Salesman Problem for the following distance matrix without using external software packages. The program should

Using python implement a genetic algorithm for the Traveling Salesman Problem for

 the following distance matrix without using external software packages. The program should

Using python implement a genetic algorithm for the Traveling Salesman Problem for the following distance matrix without using external software packages. The program should create an output file containing the best tour generated during each generation. Please provide: The input data file with the below distance matrix . The source code of program . The output file Create data Matrix using below: Bakersfield 129 Barstow 206 153 Carlsbad 569 696 777 Eureka 107 236 315 462 Fresno 360 395 780 398 388 Lake Tahoe, So. 284 155 312 797 408 466 Las Vegas 314 Long Beach 364 335 118 153 Monterey 432 403 126 88 111 Oakland 112 111 388 426 144 139 82 713 251 479 115 130 93 694 222 456 302 162 291 370 407 55 194 446 200 329 406 369 93 156 484 231 360 428 388 152 266 504 288 417 496 291 181 195 567 226 123 116 795 333 435 276 436 565 644 150 329 249 640 580 551 274 236 272 401 480 314 185 107 587 416 387 110 72 185 87 498 174 71 827 43 281 436 228 68 59 336 374 394 462 52 231 176 23 800 338 542 332 105 116 393 431 451 519 139 297 426 505 272 190 192 568 441 412 135 97 116 9 523 252 381 460 317 145 197 524 396 367 114 82 71 40 478 118 247 293 504 137 197 414 229 200 192 230 135 227 311 492 354 240 332 206 45 72 484 166 59 573 234 263 347 146 225 188 609 242 124 95 297 335 258 387 466 349 151 229 524 402 373 118 114 140 75 453 199 207 426 347 476 565 222 240 121 250 329 544 82 227 356 435 356 120 200 329 408 488 93 133 199 610 335 408 131 510 435 29 Los Angeles 306 277 Merced 344 315 37 Modesto 491 462 265 236 371 342 344 315 185 147 137 175 65 27 119 81 446 514 Palm Springs 325 214 682 Redding 164 Sacramento 610 446 San Bernardino 667 503 105 San Diego 223 87 471 528 San Francisco 254 114 426 483 411 301 259 316 546 406 254 211 286 146 432 489 251 103 411 247 209 45 191 45 San Jose 232 187 337 292 77 32 521 578 50 95 295 352 272 227 401 458 84 69 355 374 431 216 195 San Luis Obispo 105 Santa Barbara 180 285 San Cruz 282 387 127 Santa Rosa 174 287 233 256 361 101 230 335 199 322 Sequoia Park 134 202 Stockton 266 175 146 Yosemite

Step by Step Solution

3.46 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Input Data File Distance Matrix A B C D E F A 0 5 3 7 9 5 B 5 0 8 6 4 7 C 3 8 0 2 10 9 D 7 6 2 0 8 3 E 9 4 10 8 0 5 F 5 7 9 3 5 0 Source Code of Program import numpy as np Initialize distance ... View full answer

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