TSP Solver
The Traveling Salesman Problem asks: given a set of cities, what is the shortest route that visits each city exactly once and returns to the starting city? This is one of the most famous NP-hard problems in computer science. No known algorithm can solve it efficiently for large inputs, so we rely on heuristics and approximations. Click on the canvas to place cities, or generate random ones, then watch different algorithms compete to find the best tour.
Optimal solutions require O(n!) time — for n=20 cities, that's 2.4 × 10^18 routes to check
← All Labs
IRIS — AI RESEARCH ASSISTANT