Genetic Algorithm
Genetic Algorithms (GA) are evolutionary optimization heuristics inspired by natural selection. A population of candidate solutions encoded as 16-bit chromosomes evolves across successive generations through fitness-proportionate selection, crossover recombination, and random mutation to conquer complex, multimodal search spaces.
Order Crossover (OX) preserves clean local loops from Parent 1 while maintaining overall city visit ordering from Parent 2.
2-Opt Mutation flips road directions between two cities to untangle intersecting highway links.
Key Evolutionary Takeaways
AI ConceptsTraveling Salesperson (TSP) is an NP-hard problem with $(N-1)! / 2$ possible circuits. For 12 cities, there are ~20 million routes!
Order Crossover (OX) splices valid partial paths between parents without duplicating any cities.
2-Opt Inversion Mutation reverses segments of the tour to directly untangle crossed highway links.
