Algorithms / TSP with iterative local search

TSP with iterative local search

Traveling salesman tours improved by iterative local search — watch city routes shorten as perturbation and local improvement iterate.

Open live demo on AlgoScape →

The traveling salesman problem (TSP) asks for a shortest tour that visits each city once and returns to the start. Exact solvers exist for moderate sizes; for larger instances, metaheuristics such as iterative local search build strong tours by improving a route locally, then perturbing and improving again.

What you will see

The AlgoScape TSP view animates candidate tours as ILS runs. Pair it with the broader ILS guide if you want the algorithmic framing; this page is the path-length intuition on a concrete map of cities.

Try it

Open the TSP + ILS demo and watch tour length drop across iterations.

← All algorithm visualizations