Zip number path

Zip puzzle: play a number path board and learn the strategy

Draw one line that starts on 1, passes every number in order and fills every cell on the board. Each board below has exactly one path that works, and the guide under it shows how to find it without trial and error.

Start here: a 6 by 6 board

Press on 1 and drag through the cells. You can also tap the cells one by one. To take a move back, slide back over your own line, or tap any cell on it to cut the line there. With a keyboard, focus the board and use the arrow keys; Backspace takes back one cell. Hint keeps the part of your line that's right and draws the next stretch, up to six cells.

The rules

You get a square grid with a few numbered cells. Draw one line that:

  • starts on 1 and ends on the highest number,
  • passes the numbers in order, 1, 2, 3 and so on,
  • moves up, down, left or right, never diagonally,
  • and fills every cell exactly once.

Some boards also have short walls between cells. You can't cross a wall, so two cells on either side of one aren't neighbours anymore.

12345671234567
A 5 by 5 board and its answer. Seven numbers, 25 cells, and one line that runs from 1 to 7 through all of them. Notice how much of the line goes between the numbers. On harder boards that's where all the thinking happens.

How these boards are made

The boards come from the engine I wrote for my Zip Puzzle app, running in your browser. It first draws a random line through every cell of an empty grid. Then it puts numbers on that line, one at a time, and after each one a solver searches for any other line that fits. Once only one line fits, the engine tries taking numbers away again and keeps the smallest set that still gives one answer. Easy and Medium boards get a few extra numbers back to make them friendlier.

Walls come in on Medium boards from 7x7 up and on every Hard board. They always sit between cells the answer doesn't use, so they never block the real line. They block plenty of wrong ones, though.

That's why the hint can be so plain. The page knows the one answer, so Hint just compares your line with it, keeps the cells that match and draws the next few.

The strategy, easiest first

To talk about cells, I'll use letters for columns and numbers for rows, like a chess board turned around: A1 is the top left cell, and on a 5 by 5 board E5 is the bottom right. Most of the ideas below come from one simple fact. Every cell is passed through exactly once, so it uses exactly two of its neighbours: one to come in and one to go out. The only exceptions are 1 and the last number, which use just one.

1. Corners only have two ways out

A corner cell has two neighbours. The line has to come in through one and leave through the other, so unless the corner holds 1 or the last number, you already know both of its links. Draw them in before anything else.

1234567
Corners. None of the four corners on this board holds a number, so each one is a bend. A1 links to A2 and B1, E1 to D1 and E2, A5 to A4 and B5, and E5 to D5 and E4. That's eight links on the board before you've thought about the numbers at all.

The same rule works for any cell that's down to two open neighbours. An edge cell has three neighbours, so once your line runs past the cell next to it on the inside, the edge cell is down to two and both of them are forced. Keep an eye on those. They show up all the time once a few stretches of line are down.

2. Walls make new corners

A wall takes one neighbour away from both cells it touches. A wall next to an edge cell turns that cell into a corner. Two walls on one middle cell do the same. So on boards with walls, look at every wall and ask which cells it leaves with only two ways out. Hard boards often hand you half a dozen forced links this way, and they're the best place to start.

3. Never leave a dead end

If an empty cell has only one open neighbour left, the line can get in but can't get out. That's only allowed for the last number. Anywhere else it means the line you've drawn so far is wrong, even if every number is still in order.

1234567
A dead end. This line from 1 went up to C2, left along row 2 and down to A3. Now A1 has only one open neighbour, B1. You could reach A1 later but never leave it, and A1 isn't the last number. So this start is already wrong, many moves before you'd notice by playing on.

The bigger version of this is a pocket: a group of empty cells your line has walled off, with only one gap leading in. If you go in through that gap you can't come back out. A pocket like that has to hold the last number, or the line is wrong. Check for pockets every time the line hugs a wall or an edge.

4. Don't skip a number

The numbers come in order, so a stretch of line that already holds 2 can never run straight into 4. It has to meet 3 first. This sounds obvious, but it settles a lot of choices on its own. When a loose end of your line sits next to a number, check that it's the very next number. If it isn't, that link is out, and the cell has to go somewhere else.

5. Don't join the ends too early

Sometimes you'll have a stretch running from 1 and a separate stretch ending at the last number. Linking them makes one complete line. If any cell is still empty at that point, the line can't be the answer, so that link is out. On a crowded board this is often what picks the last few moves.

6. Count the checkerboard

Color the board like a chess board, with the corners dark. Every step moves to the other color, so the line goes dark, light, dark, light the whole way. That gives you a few counting rules:

  • On a board with an odd size, like 5x5 or 7x7, there's one more dark square than light. The line has to start and end on dark, so 1 and the last number always sit on dark squares.
  • On an even board, like 6x6 or 8x8, the colors are equal, and 1 and the last number sit on different colors.
  • Two numbers in a row on the same color need an even number of steps between them, so there's at least one cell between them. On different colors the count is odd.
  • Each pass through a pocket covers dark and light in turn, so one pass can cover at most one more square of one color than the other.
1234567
Checkerboard. The same board as above. It has 13 dark squares and 12 light ones. 1 sits on C3 and the last number, 7, on D2. Both are dark, as they have to be on a 5 by 5 board.

The last rule matters most on big boards. When you see a pocket with two extra squares of one color, a single pass can't fill it. Either the line has to visit it twice, or it's the end of the line.

7. Work backwards from the last number

The last number is an end of the line, so the line touches it exactly once. All its other neighbours have to be filled earlier, by other parts of the line. Look at the cells around the last number and ask which of them the final stretch could still pass through. Often the answer is only one, and then you know the final step before you've placed anything. 1 works the same way from the other end: it uses exactly one neighbour, so once that link is drawn, cross off its others.

8. Trust forced links over long plans

It's tempting to draw from 1 and keep going. On easy boards that works. On harder ones a long planned route usually runs into a dead end around the fifth number. You'll get further by drawing short forced pieces all over the board first, from corners, walls and the two ends, and only then joining them up. That's how the worked example below goes.

A worked example

Here's a Hard 5 by 5 board from the same engine: four numbers and four walls. Every step below uses only the rules above, and no step needs a guess. I checked that with a small step by step solver that knows nothing but those rules.

1234ABCDE12345
The board. 1 is on A3, 2 on B1, 3 on C3 and 4 on D2. The walls sit under C1, between A4 and B4, under B4, and between C5 and D5.

Step 1: corners, walls and the start

All four corners are empty, so they're all bends: A1 joins A2 and B1, E1 joins D1 and E2, A5 joins A4 and B5, and E5 joins D5 and E4.

Now the walls. C1 has a wall under it, so its only ways out are B1 and D1. A4 has a wall on its right, which leaves A3 and A5. B4 has walls on two sides, so it links B3 and C4.

The bottom row has three more. B5 loses B4 to a wall and links A5 and C5. C5 loses D5 and links B5 and C4. D5 loses C5 and links D4 and E5.

The start comes next. 1 on A3 already links to A4, and 1 is an end of the line, so it can't take A2 or B3. That leaves A2 with just A1 and B2, so A2 links to B2.

1234ABCDE12345
After step 1. Three separate pieces. One runs from 1 down and round to B3. One runs from B2 through 2 and along the top row to E2. A short one runs from D4 round the bottom right corner to E4.

Step 2: the numbers have to come in order

E2 is the loose end of the piece holding 2. Its open neighbours are D2 and E3, and D2 is 4. Joining 2 straight to 4 would skip 3, so E2 has to go down to E3.

B3 is the loose end of the piece that starts at 1. Its open neighbours are B2 and C3, and C3 is 3. Joining 1 to 3 would skip 2, so B3 goes up to B2. That joins the two big pieces into one line from 1 through 2 that now ends at E3.

B2 is full now, which leaves C2 with only two ways out: C1 is behind a wall, so it's C3 and D2. C2 links both, which puts 3 and 4 next to each other on the line. 4 is the end, so D2 is done. And 3 still needs a second link: B3 and C4 are full, so it has to be D3.

1234ABCDE12345
After step 2. A long line from 1 through 2 to E3, the piece D3, 3, C2, 4, and the bottom right piece from D4 to E4.

Step 3: don't join the ends too early

E3 and D3 are neighbours. But E3 is on the line from 1 and D3 is on the piece ending at 4, so joining them would make a finished line with D4 and E4 still left out. That link is out. D3 has to go down to D4, E3 goes down to E4, and the board is solved.

1234ABCDE12345
Solved. A3, A4, A5, B5, C5, C4, B4, B3, B2, A2, A1, B1, C1, D1, E1, E2, E3, E4, E5, D5, D4, D3, C3, C2, D2.

Look at how little of that came from the numbers. Corners and walls did most of the work. The numbers only had to settle two choices, and the last move came from refusing to close the line early. Bigger boards go the same way, just with more pieces.

A routine for any board

  1. Draw every corner bend.

    Skip corners that hold 1 or the last number.

  2. Walk the walls.

    Find each cell that a wall, an edge or your own line has left with two ways out, and draw both links.

  3. Finish the two ends.

    1 and the last number take one link each. Once it's drawn, nothing else touches them.

  4. Check every loose end against the numbers.

    A piece holding 2 can't run into 4. A piece from 1 can't reach the last number while cells are still empty.

  5. Look for dead ends and pockets.

    Any empty cell with one way in is the last number or a mistake. Count colors in a pocket if you're unsure.

  6. Only then plan a route.

    By now most boards are a few short gaps between pieces, and the joins are easy to see.

Mistakes that cost the most time

Racing from 1. Drawing from the start feels natural, and it's how the board invites you to play. But the start is usually the least constrained part. Corners and walls far from 1 often decide the route before your line gets there.

Hugging the edge. Running your line one row in from an edge leaves a strip of edge cells that can only be filled from its two ends. If one of those ends is blocked and the strip doesn't hold the last number, it's lost. Either run along the edge itself or leave at least two rows.

Forgetting the line has to fill everything. Reaching the last number too early is an easy way to lose a board. If the numbers are all linked but cells are empty, back up to the last spot where you had a real choice.

Questions

Is this the same puzzle as the Zip game on LinkedIn?

The rules are the same: one line from 1 through the numbers in order, filling every cell. These boards are my own, made by my engine, so you won't find LinkedIn's daily board here, and this site has nothing to do with LinkedIn.

Does every board have only one answer?

Yes. The engine checks every board with a full search for a second path before it shows it to you. The site's build also solves the boards in this guide again with a separate solver.

Can the line go diagonally or cross itself?

No. It moves up, down, left or right, and it visits every cell exactly once, so it can't cross or touch itself on the same cell.

Does the line have to end on the highest number?

Yes. 1 is always the start and the highest number is always the end, and all the cells have to be filled before you get there.

What do the walls do?

A wall sits on the edge between two cells and the line can't cross it. Walls never block the answer, but they rule out many wrong routes, which is why Hard boards can get away with so few numbers.

Is there a version for my phone?

Yes. My Zip Puzzle app for Android has levels from 5x5 to 9x9 that keep coming, a daily board that's the same for everyone, and three board looks. It works offline.

If you only take one thing from this page, make it the corners. Draw them in before you touch 1, and most boards open up on their own.

Zip Puzzle
Levels from 5x5 to 9x9, a daily board that grows from 6x6 on Monday to 9x9 on Sunday, and three board looks.

Get it on Google Play
All puzzles
Code breaker

Bulls and cows solver

Enter your guesses and their bulls and cows. See every code that still fits and a suggested next guess.

Solver