Genetic algorithm (GA) and travelling salesman (TSP)

preview_player
Показать описание
Exercise 4.3b from AIMA (Artificial Intelligence, a Modern Approach), has you solve the travelling saleman problem (TSP) with a genetic algorithm (GA). Solving TSP with GA is a little tricky, though, since both the recombination and mutation stages can render the tours invalid.

Larrañaga (1999) has some methods for preserving the validity of tours; we chose the alternating-positions crossover and the scramble mutation.

This is 10 nodes converging with an initial population of 500; and a mutation-probability of 50% (mitigated by a factor of 0.8 every generation).
Рекомендации по теме