Understanding Optimization through Tour Planning
Find the shortest route visiting all cities exactly onceThe Traveling Salesman Problem is a classic optimization problem where a salesman must visit n cities exactly once and return to the starting city, minimizing the total travel distance.
Explore different tour configurations and see how distance affects the utility function!
Green city (A) is both start and destination •
The dashed green line shows the return journey
For the Traveling Salesman Problem, we want to minimize the total tour length. Our utility function reflects this optimization goal:
Negative values represent the cost of the tour.
Higher utility corresponds to lower cost (better solution).
This formulation aligns with maximization-based optimization algorithms.
The most common local move for TSP is the 2-opt operation:
The TSP creates a complex optimization landscape:
Compare different tours and their utility values:
Now that you understand the TSP and its utility function, you're prepared to explore local search algorithms like Hill Climbing with 2-opt moves, Simulated Annealing, and Genetic Algorithms for solving large-scale TSP instances.