Skip to main content
← Back to blog

How to Master Traveling Salesman

TLDR: Traveling Salesman asks you to visit every city exactly once and return home using the shortest possible loop. Tap cities in order, press Check when all are on the route, and win only when your distance matches the true optimum. The game reveals the optimal route when you lose, so study it - self-crossing routes are almost always the culprit, and uncrossing them shortens the tour.

What You Are Really Solving

Traveling Salesman is a bite-sized version of one of computer science’s most famous problems. You start at a home marker on a scattered map of cities. Your job is simple to state and genuinely hard to solve: visit every city exactly once, then return home, using the shortest possible total distance. There is no formula, no shortcut - you must reason about the geometry directly and compare whole routes against each other until you find the one that cannot be beaten.

The game tells you the distance of your current tour in real time as you tap. Once all cities are visited, press Check. If your loop matches the true optimal solution, you win and advance. If it is longer, you see the true shortest route overlaid on your own - the most valuable moment in the game. That immediate visual comparison shows you exactly where you went wrong.

The twist that keeps the game fresh is growth. Every few levels, the map gains another city. Five cities becomes six becomes seven. Each addition seems small, but the number of possible orderings multiplies dramatically. What you could eyeball at level one becomes a genuine optimization challenge by level ten.

Traveling SalesmanOpen game →
Loading…

The Rules in Full

Start by studying the map. You will see the home marker (your starting and ending point) and the other cities scattered around it. Your route always begins and ends at home - you only tap the non-home cities, which form the loop.

Tap cities in the order you would visit them. The route draws itself as a line connecting each tap. The distance counter updates live with your running total. If you make a mistake, use Undo to drop the last city from the route, or Clear to wipe the whole route and start over.

Once every city is tapped, press Check. The game compares your loop to the true optimum computed by checking every possible ordering. If they match, you win. If yours is longer, you see both routes displayed side by side so you can diagnose where you went wrong.

The rules are strict: each city exactly once, the loop must close back to home, and your distance must match the optimum to win. There is no partial credit or “close enough.”

The Most Important Pattern: Self-Crossing Routes

The single most important thing to learn is how to spot and avoid self-crossing routes. Most non-optimal tours fail because the path crosses itself. When two segments of your route intersect, you are wasting distance - and uncrossing them almost always shortens the tour.

Here is why: picture four cities forming a rough square. If you visit them in an order that creates an X shape - where the route goes from top-left to bottom-right, then from top-right to bottom-left - those two segments cross. The optimal tour follows the perimeter instead: top-left, top-right, bottom-right, bottom-left. Same cities, no crossing, shorter total distance.

When the game shows you the optimal route after a loss, the first thing to look for is where your route crossed itself. The optimal solution will have untangled those crossings. Often, swapping the position of just two cities in your ordering removes a crossing entirely and brings your distance to the optimum.

After every loss, count the crossings in your route before looking at the optimal one. How many intersections can you see? The optimal route will have removed all of them. Then identify which city swap would eliminate the worst crossing. This comparison is where the most learning happens - not from the win, but from the diagnosed loss.

The Perimeter Walk. On a new map, mentally trace the outer boundary first - the cities that form the convex hull (the outermost shape). The optimal route often follows this perimeter, visiting outer cities in clockwise or counter-clockwise order before inserting any inner cities. Build your tour around the edge first, then insert interior cities in the gaps where they cause the least extra distance.

Systematic Route Building

Do not tap cities randomly and hope. Build your route step by step, making local decisions that minimise backtracking.

Start at home and ask: which city should I visit first? Usually it is one of the nearest, or one positioned in a direction that lets you sweep across the map without backtracking. Tap it.

From each city, ask the same question - which unvisited city minimises the extra distance I travel from here? This greedy approach (always going to the nearest or most sensible next stop) does not always yield the optimum, but it builds a reasonable starting tour that you can then refine.

Once you have a first-attempt route, mentally walk through it. Where does the distance feel wasteful? Is there a long segment stretching across the map where two cities that are far apart are adjacent in your tour? Could swapping two cities in the ordering remove a crossing or eliminate that long jump? These small local improvements often convert a good tour into the optimal one.

Nearest Neighbour, then Refine. Tap cities greedily, always heading to the nearest unvisited stop. Note your distance. Then walk the route mentally and find one crossing, one backtrack, or one inefficiency. Swap the two cities involved in that inefficiency, re-tap the route with the swap, and check if it improves. Repeat until you match the optimum or run out of obvious fixes.

Greedy is not optimal. The nearest-neighbour approach feels natural but often leaves distance on the table. Early levels may forgive it, but as the city count grows, greedy tours consistently fall short. Use nearest-neighbour as a fast starting point, then refine - do not rely on it as the final answer.

Common Mistakes and How to Avoid Them

Tapping in arbitrary order and hoping. Map geometry matters. Cities close together should appear consecutively in your tour. Clusters should be toured as a group before you move to the next cluster. A random ordering almost always includes expensive long jumps that a geometry-aware ordering avoids.

Fixating on your first tour after a loss. When you lose, do not just undo one city and re-tap. Study the optimal route the game shows you. Where is it fundamentally different from yours? What ordering principle does it follow that yours did not? This meta-view - comparing whole strategies, not just individual cities - is where real improvement happens.

One very long segment is a clue, not a coincidence. If your tour has one leg that stretches across most of the map, that almost always signals a poor ordering. In the optimal route, no single leg should be drastically longer than the others - the distances should feel balanced. A lone long jump usually means two cities that are far apart are adjacent in your tour when they should not be.

Feeling locked in after a few taps. Use Undo and Clear freely. If the route feels wrong after five cities, wipe it and try a different starting direction. Iteration is faster than struggling to fix a fundamentally wrong approach.

Looking for a memorisable formula. Every map is unique. “Always go clockwise” or “always visit the top first” will not work across different maps. The optimal strategy depends on this specific geometry. Train yourself to read each new map freshly rather than applying a remembered rule.

Spend 10 seconds studying the map before tapping anything. Where are the clusters? Which city is most isolated? What is the rough shape of the map - is it spread out or compact? Is there one city far from all the others that will require a costly detour? These observations guide your first few taps and often steer you toward the optimal route before you have committed any distance.

As Difficulty Climbs

Early levels have four or five cities. The number of possible orderings is small enough to eyeball. At this stage you can often see the answer before tapping - just scan the map, identify the most natural loop, and execute it.

At level six or seven, a sixth city appears. The number of possible routes increases dramatically. Eyeballing stops working reliably. This is where the strategic skill becomes necessary. You must reason about geometry, spot crossings, and compare strategies rather than just guessing.

Every few levels, another city is added. By levels twelve to fifteen, you are managing seven or eight cities. The number of possible routes is in the hundreds of thousands. You cannot mentally check them all. You must think structurally - use patterns, trust spatial instinct, and approach each map as a geometry problem to solve rather than a sequence to memorise.

Divide and Conquer on larger maps. Mentally break the cities into clusters or regions. Build an efficient sub-tour within each region, then link the regions in the order that minimises inter-region distance. Solving smaller sub-problems and then combining them is a reliable approach once the city count exceeds six or seven.

Practice Routine

Three focused sessions per week of about 10 minutes each is enough to build rapid improvement.

Session 1 - Geometry Observation. Play three rounds without racing. Before tapping any city, spend 15 seconds describing the map shape to yourself: “cities form a rough oval with one outlier to the left.” Let that shape guide your tour. Practise reading map structure before committing distance.

Session 2 - Crossing Elimination. Play three rounds. After each loss, spend a full minute comparing your route to the optimal one. Count every crossing in your tour. Ask: what one swap would eliminate the worst crossing? This deliberate analysis is where long-term intuition is built.

Session 3 - Speed and Consistency. Play five rounds and try to win three in a row. By round three, you should feel the improvement - route-building is faster, crossing-spotting is more instinctive, and your distances are closer to optimal more often.

Progress marker. You are improving when you win a round on your first attempt - when you can predict the optimal route from the map geometry and execute it without needing the feedback reveal. Early players lose frequently; intermediate players win most rounds but still fall short at higher city counts; advanced players win consistently through level ten and beyond.

Traveling SalesmanOpen game →
Loading…

Build a mental pattern log. After each round, note what worked: “perimeter-first succeeded here” or “the isolated city in the upper-left needed to be visited last.” Over time, these observations compound into spatial intuition that applies across all future maps, even ones you have never seen before.

Final Thoughts

Traveling Salesman trains a skill that transfers far beyond games: the ability to reason about spatial arrangement and optimization without a formula. You are exercising the same thinking that engineers use to design delivery routes, surgeons use to sequence operating steps, and architects use to arrange spaces efficiently.

The game is designed to grow with you. Early rounds teach the basics - tap cities, spot crossings, check your distance. Later rounds demand deeper reasoning - balancing multiple constraints, seeing the global picture, trusting spatial instinct when the number of possibilities explodes.

Start where you are. Play the rounds that sit at the edge of your ability. Take time to learn from each loss. The optimal route is always there, waiting to be seen. Your job is to train yourself to see it faster.

MemPi
Play on your next flight · works offline
Add PlayMemorize to your home screen
In Safari, tap Share , then choose “Add to Home Screen”.