A Numberlink Solving Primer

Anyone paying close attention to the comments/posts/alerts here knows there is a post that has been stealthily creeping around here. It was published a few days ago, then taken back down because I decided I hadn’t addressed some things enough (taking it down confused many people’s alerts), then sent to someone else to have a look who gave some quick feedback in a comment, confusing someone else who couldn’t find the mentioned post. The original person I sent it to evidently thought it was already public because of how I messed up the alerts. Confusion over now: this is the post. I’ve finally decided I’m happy enough with it to publish it, so here it is.

This post gives some tips on how to cleanly get through a Numberlink puzzle, one of my favorite types that nikoli puts out. It comes slightly in response to some comments here (which in turn responded to my offhand reference of a recent puzzle solving a little bit like one) from people evidently less enthusiastic about the puzzle than I am.

Personally I get the most enjoyment out of the puzzle when I am able to coast through to a solution without ever goofing too badly. Of course, it’s hard to be able to do with some consistency, but it’s not completely down to luck. After reading all of this, you’ll hopefully be able to get that perfect solve more often.

Numberlink is not the usual nikoli logic puzzle

As some recent comments here made me aware, several people have disdain for Numberlink because they dislike using the fact that all squares will be used (which is not an actual rule of the puzzle, merely an unwritten requirement for any that nikoli publish) and any deduction that relies on there being one solution. You shouldn’t feel guilty for using this, because you need a mindset that’s a bit different from the one you might usually tackle logic puzzles with. If you come up to a Numberlink puzzle hoping to have the same kind of “aha!” moments that a standard logic puzzle gives you, you’re bound to be disappointed. Numberlinks have their “aha!” moments too, but they’re of a different flavor.

I can understand that some people, as a matter of taste, just don’t like the feeling of taking risks, which is perhaps why they do nikoli puzzles in the first place. Personally I find that a bit unfortunate, because these puzzles can be very, very satisfying. There is a reason nikoli chooses to publish this type despite it flying in the face of their usual adherence to logic.

Bottom line: don’t try to solve a Numberlink in a way that shows the solution is unique. That’s not just getting off on the wrong foot, that’s trying to do a tightrope walk with a pegleg. Let the constructor (and, depending on your source, nikoli’s editors) deal with those painstaking details; as the solver you’re supposed to enjoy the puzzle.

This does mean that solving a Numberlink is of course going to take some leaps of faith; this is one of the first things most people learn about it. The metalogic mentioned above is what you use to guide those leaps of faith in the right direction. Don’t use it, and the puzzle really does come down to luck.

How to make good guesses

Here are a few big things to keep in mind when you’re thinking about drawing a path in. I apologize if some of the explanations are unclear, but all of these ideas are heavily used in the sample puzzles done below, so hopefully that will clear up any confusion.

1. Watch what happens at corners.

As long as you consider using uniqueness and the usage of all squares fair game (and you should), this is one of the few genuine logical deductions you can make. If you ever have an empty space at a corner, either because it’s a corner of the whole grid or you’ve assigned some of its adjacent squares to a path between two numbers, there are a number of lines you can draw from that corner. Here’s an example of some paths you can draw right from the beginning in one of the samples done below.

Numberlink progress

As you can see, you can continue to draw segments making a 90 degree turn at the corners until you hit a number. The main reason you can do this is because of uniqueness; if the path bent back on itself prematurely, you would be able to shortcut it and get alternate solutions.

In no situation should you ever be able to draw corner segments that don’t eventually hit a number. If you ever draw a path that causes this to happen, you are 100% sure to have done something wrong somewhere. Use this to your advantage when you’re thinking about whether a path makes sense or not; a lot of potential guesses can be eliminated in this way. A path that turns willy-nilly and makes lots of corners everywhere is not likely to be correct.

2. Avoid cutting off other numbers.

One of the only rules in Numberlink is that paths cannot intersect, and so clearly you’re going to want to make heavy use of it. If you’re connecting two close numbers near the center, this rule hardly applies. (Consequently, you seldom want to use such numbers to get started.) But if you’re trying to connect two numbers near opposite edges, you should try to do your best to not have to make too many other numbers squeeze past them. Weave around numbers if you have to, and try to keep pairs on the same side.

This rule is especially applicable if one or both of the numbers are actually on the edge, because then no one can squeeze past them. Very often if a pair of numbers are both on the edge (either the edge of the puzzle or of the segments you’ve drawn in), you want to try to connect them along the edge, where they won’t cut anything off. Using this is often a great way to make progress in the middle of a puzzle when you’ve got a lot of segments drawn in and some numbers alongside them. (But beware: the nikoli authors know this and at least one sample puzzle in the link below subverts the hell out of it.)

3. Leave exactly the right amount of space for almost-trapped numbers to escape.

This is related to the above. Perhaps you’re thinking of connecting two numbers, one on the edge and one two spaces away from it. In that case you probably want to have two numbers whose paths come through those two spaces. If you had more, they wouldn’t all be able to fit. If you had less, you could leave unused squares and uniqueness would be lost, so you know you’re not on the right track.

4. If you have two pairs of numbers A and B, with one of the As adjacent to one of the Bs and the other A adjacent to the other B, expect the paths between them to run alongside each other.

This is not a guaranteed truth and it’s not hard to think of a situation where another number might be squeezed in between, but I can’t recall ever seeing a puzzle where it did not hold. This is mainly useful when you’re having trouble breaking into a puzzle. You’re basically dealing with a path of width 2, and if the grid is sufficiently crowded that might heavily restrict where that path can go.

Also, if you spot this, note the configuration of the pair of numbers, and keep in mind if one of the numbers will have to loop around the other (untwist itself, in a sense).

How do I get started?

The hardest part of a Numberlink is almost always drawing the first path in correctly, especially on the larger and more difficult puzzles where the corners give little to no info. There’s no 100% consistent method to figuring this part out. In fact if you’re on nikoli.com and you check the histories of the top few solvers on a large Numberlink, they’re more likely to all start in different places than not. That said, there are some things you can do that will help.

First of all, try to keep your search near the edges. This is because of points 2 and 3 above. Those methods can hardly be used when dealing with numbers in the center of the puzzle with no other progress to anchor yourself on.

Second, along the lines of the above, make use of any edge clues given to you. This is especially true if both of a pair of numbers are along the edge, because of one of the points mentioned above. Imagine connecting them across the edge, if that’s possible. Are all of the corners you make sensible? If they didn’t go across the edge, they have to cut across other numbers. Is there an easy way to zigzag around so that no pair of numbers is split up? The answer to the latter is “no” surprisingly of then, and this often allows you to draw in the path around the edges immediately. In my experience the hardest Numberlinks to break into are the ones that have no edge clues at all, so don’t waste the ones you have.

Third, a Numberlink solution is likely to have several paths between numbers that are almost entirely vertical or horizontal. These are often the easiest paths to draw in first if you can find which ones they are. If you see any numbers on the same row or column (even if they’re just a little off), imagine a direct route between them and evaluate how well it works. If you had to do a small zigzag, do the corners make sense on both sides? What numbers would go around the path you’re thinking of, and do they get closer to their counterpart if they take that route? Or better, can you foresee a sensible way in which those other numbers might be linked up?

If things look okay, now try imagining the path not going straight. This probably means looping around a number or two and having them escape out. Do you leave the right amount of space for things to get out? Do the numbers you looped around get led in the general right direction? If you can imagine some sensible curvy paths between the numbers you’re trying to link, that’s a reason to hold off on the straight one.

Remember that if you have trouble finding a reason to believe that the straight line you’re drawing is right, you may not want to draw it in, because Numberlink constructors love to thwart your expectations and make a number’s path curve in a nonintuitive way when a straight line seems like it would make sense.

Finally, try to visualize completely linking two or three numbers before you draw in your initial guesses. If that straight line you’re thinking about leaves a sensible amount of space for other numbers to go around it, try actually finding connections for those numbers and evaluating them. You’ll notice in the sample puzzles below that every time I break into a puzzle I’m connecting at least two numbers completely, and sometimes more. Often there’s a lot of ways to connect a single pair that make sense, but if you can find multiple connections that work together well, it’s much harder to believe you’re not on the right track.

You can use this in reverse too. If you’ve found a couple ways you might link things up, try seeing what happens with other numbers that you’re nearly cutting off or looping around. If you can’t see any good way to link them up, maybe because your first guess leads a path in completely the wrong direction, that’s grounds for discarding that as a possible guess.

Attacking the right place

Some of you may be shaking your head at what I’ve been saying. You remember doing Numberlinks in which some of the paths do lots of strange things, and here I’m trying to keep you thinking simple. How are you supposed to figure out those paths that do all the weird stuff? The key is that those crazy paths should be the last ones you find. Let the other information you get force that path.

More generally, there is a sense in which certain areas of the Numberlink are more amenable to be figured out early, while others make the numbers do ridiculous things and you are unlikely to guess them without other information. If part of a completed Numberlink puzzle has lots of paths going along the edge or direct connections, that’s likely one of the places you should try to start out. (Puzzles that avoid doing this anywhere are 1. rare and 2. inherently difficult.)

The obvious problem is that you don’t know the solution beforehand, so you have to figure out yourself where to try to attack the puzzle. If you’re unfortunate enough to focus in on a place where the solution does crazy things, you’re likely to get burned. This is why I’ve been suggesting in the previous section to try to imagine alternate, less simple ways to link up numbers once you’ve found a simple one that seems to work. That simple solution you’ve found might seem fine, but just how sure are you that this isn’t the area that the Numberlink constructor left a crazy zigzag?

It’s the same way that when you’re doing a standard nikoli logic puzzle and you find an area that you can resolve in two different ways, you’re less inclined to try to use logic on that part. How is logic supposed to distinguish between two valid solutions? Similarly, how are you supposed to pick between two sensible looking guesses in a Numberlink? It’s best to consider that area a dud and try to find another place where there are fewer options that make sense.

With experience, you’ll eventually get a sense for what kind of patterns make it hard to connect numbers without creating problems with corners or too little/much space. If you spot these patterns in a puzzle, you know that area is unlikely to present multiple ways of being resolved, and you can try to focus your attention on it. Example: A number stuffed in a top left corner with a different number two squares to the right of it. Such a number pretty much has to go down and have the nearby number make a corner on the space to the right, which might give a lot of information if that corner goes on for awhile.

And remember, you’re not intended to solve a Numberlink with a method guaranteeing a 0% error rate. At some point you are going to have to take a plunge. But if you’re careful enough about the implications of that plunge and the other possibilities that you’re rejecting, you can be more confident that you’re headed in the right direction.

Sample Puzzle Demonstrations

The best way by far to show how to approach a Numberlink puzzle is by example. To that end, I did all of the sample problems nikoli provides on their site and recorded my train of thought while doing each one. The solves were fresh; I think the last time I did these was over a year ago when Numberlink first came out on nikoli.com. Then I picked four of those writeups (1, 4, 7, 9) to include in this post. I didn’t do them all to leave people without nikoli.com subscriptions a batch to test their mettle on, and also because not all of the writeups were that illuminating.

The text below is an accurate depiction of what I was thinking as I solved each one; I did not go back and edit out mistakes or suboptimal ways of proceeding. (only the images were added after-the-fact) So they may not be the best methods, but they were what I came up with as I was trying to solve the puzzle as quickly as possible.

Sample Puzzle 1, by Ryohei Nakai (Easy 10 by 10)

Numberlink progress

The 1s are on the edge and their loop must contain the 2s. So draw a direct path between the 2s and have the 1s wrap around.

Numberlink progress

Now there’s a corner you can draw around the 6. Extend those segments as far as you can. One of those ends has to hit the 3 in the corner. The other end can go straight to the other 3 without cutting off anything.

Numberlink progress

The path from the 6 seems like it can go straight up to the other one, allowing the 7 to wrap snugly around it.

Now it’s easy. Have the 4 go around the edge and the 5 wrap around the 7.

Numberlink progress

Sample Puzzle 4, by crimson (Easy 10 by 10)

Numberlink progress

Lots of corners. Start with them.

Numberlink progress

It seems like there would be a way for the 1s to link up, by going along the left, bottom, then right edges and jutting out. I liked this at first because the 2 can wrap snugly around it along the right edge. But this creates bogus space at the top right. This can’t be right.

Numberlink progress

How could we deal with that space differently? What if we tried having the 7 escape through there? It makes sense given the location of the other 7.

Numberlink progress

Aha! Now we see if we have the 2 run closer to the right edge than the 1 (unlike the above), things work out better. Even the 7 links up nicely. *fuzzy feeling*

Numberlink progress

Next to the 7 we can draw a huge cascade of corner segments. These practically force how the 8, 4, and 5 link up. The 6 and the 3 are easy to do, and the puzzle is done.

Numberlink progress

Sample Puzzle 7, by Casty (Medium 18 by 10)

Numberlink progress

Very few corners, and the ones that are there are almost completely unhelpful.

This one is a little harder to break into. The first thing that caught my eye was the 13 on the bottom. It can nicely zigzag around the 14 and 6 to link up to the other one. (Here I’m using the same row/column heuristic mentioned in the getting started section.) And then we can do the exact same thing with the 14. It makes no corners, which is nice. The possibility of this being wrong is a little above what I’m usually comfortable with, but it looks good enough to go with as a guess. And more importantly, I can’t see a remotely nice way to have them zigzag around.

Numberlink progress

Getting that 6 up to the other one looks awkward. Going up to the right of the 7 and 8 creates obvious issues with corners. But if we go to the left of them…

Numberlink progress

… then we leave just enough space for the 8 to escape around the 7! This definitely feels right. Also notice the 7 and 8 are adjacent pairs, so they probably run together.

How should we finish up the 6? If we go up and then right, we leave a little too much extra space for the 7 and make contradictions with the corners. But if we go right then up, we even leave a nice way for the 3 to squeeze through. This has to be right.

Numberlink progress

Lots of corners to draw now. The 7 and 8 are made very obvious as a result.

Numberlink progress

We have the 1 and 2 in the top left. If the 2 escapes to the right, there’s extra white space. So let’s have it go down. And look! It can easily run along the bottom edge and link up.

Numberlink progress

The 12 seems like it should be doable. The best way to link it up would be to be close to the edge while leaving just enough space for the 4 to get out. We can check that the corners this creates make sense, so let’s draw it.

Numberlink progress

The resulting corners practically force the 11 together.

Numberlink progress

If we have the 4 run along the right edge, which makes sense to avoid cutting things off, the 5 can run right along it and link up easily.

Numberlink progress

The 1 has the longest way to go. But it’s easy to see it has to zigzag with the 4 above and the 9 and 10 below. This basically forces its path, and the rest is trivial.

Numberlink progress

Sample Puzzle 9, by Guten (Hard 24 by 14)

Numberlink progress

Not only hard, but large too! Let’s see how we can tackle this one. A lot of corners to draw in at first.

The 19 and the 18 strike me immediately. They almost certainly go straight up. There’s nothing nearby the 19 can loop sensibly around, seeing as how the 4 and 17 are grouped together and the 19 doing a loop-around can only leave space for one number to get out.

Numberlink progress

Check out where the 20 has to go. To avoid cutting off numbers, it seems best for it to hug the right edge as closely as possible. Of course, the 14 has to go even closer to the edge, but nothing else does. So what if we have the 20 use the 2nd outermost of the top right corner segments? Hey, that’s excellent! It can run straight to the other 20 on the top and leave just enough space for the outermost segment! Let’s draw all of that in.

Numberlink progress

This gives us a ton of corner segments to work with too.

Numberlink progress

The part I’m most struck by now is the bunched up nature of the 6, 21, and 22. If we have the 22 run horizontally, then the 21 can easily wrap around the 6, and the 6 has an easy to draw path.

Numberlink progress

It’s tempting to draw the 7 straight down, but that makes a bogus corner segment going toward the lower left. But we can curve it around the 8 and there’s no problems. It even leaves just enough space for the paths on the bottom.

Numberlink progress

The 5 and 8 could go straight up. If they did, then the 2, the 14, and another unknown loose end would have just enough space to escape through the top edge. Looks perfect. Let’s draw that in.

Numberlink progress

I’m trying to think about how I might link up the 3 since it’s on the edge of our known paths. First I think about going between the 1 and 16. The problem is that strange things happen with the corners and there isn’t enough space for things to get out. So it probably goes to the right of the 1. Perhaps the 1 goes straight up and the 3 goes around it and the 2? The problem with this is the 2 has a long way to go and it almost certainly will cut off the 9 in the process. So probably the 3 goes between the 1. And there’s a nice way to make this work with corners while connecting the 2 up too. Worth a shot.

Numberlink progress

Now there’s another issue. How do we link up the 1 and not cut off the 9? We probably have to go a long way. Wait a second, we had that unknown loose end across the top edge! The top 1 can easily connect to that. Then we can use it to loop around and bypass the 9. This even perfectly splits up the top and bottom halves of the numbers if the 9 goes straight. No way we’re wrong here. Time to draw stuff in.

Numberlink progress

The bottom half is pretty simple. The 1 goes along the outer edge with the 15 next. After drawing in corners the 17 is practically forced, and the 4 and 16 are trivial now.

Numberlink progress

Using the corners in the top half solves a lot of it. We can easily make the 10 run along the edge, then have the 11 wrap around the 12 which just goes straight. The 13 and 14 are simple to finish.

Numberlink progress

Now what?

Hopefully, if Numberlink was not your cup of tea, you learned something that may help you appreciate it more. As mentioned above, there are 6 additional sample puzzles that I did not go over in this post that you can try out yourself for practice. But don’t necessarily expect to improve immediately; for getting quick times you’ll have to develop some intuition about where to attack a puzzle when you get stuck, and those heuristics are probably going to be pretty personal.

Personally, I started to get better at them when I sat down with a Puzzle the Giants compilation from nikoli (about a dozen Numberlinks around 36 by 20 in size) and tried to solve them all without any erasing, just for fun. It involved a lot of staring and if I had timed myself I would have done terribly. But in the end, I got through all but one or two of them without a single mistake. And when the next few Numberlink puzzles were published on nikoli.com, my times and my consistency showed an immediate improvement.

So perhaps for those 6 sample puzzles, you may want to try to perfectly solve them without worrying about time at all. And when you really feel ready, see if you can do the same for the huge, Extra hard puzzle that’s available here. And as I said in the beginning, the best feeling comes when you nail the puzzle perfectly (it doesn’t matter how long it takes), so that may help put the type in a more positive light as well.

Good luck and happy solving.

Tags: , ,

11 Responses to “A Numberlink Solving Primer”

  1. zyzzyva Says:

    With this guide, I was finally able to solve an extra level numberlink. Thanks, Mellowmelon!

    • MellowMelon Says:

      Thanks and congratulations. I think it could be argued that Nikoli’s Extra Numberlinks are the hardest to solve of all of their puzzles. You can make it through their other tough ones by knowing all of the relevant logic and taking enough care not to mess up. The giant Numberlinks on the other hand have no straightforward way to get from the start to the finish, and they are the stuff of nightmares if you reach the end and find things have gone wrong.

      Even if it ends up useless to everyone else who reads it, I feel like it was worthwhile to write just from hearing that.

  2. D McRae Says:

    Thanks for this tutorial. I found that I would stare at these for a long time, and get it all at once, or not at all. Clearly I couldn’t do a Hard or Extra Hard that way, so this guide has really helped me break this type down into manageable steps.

  3. linked_puffbird Says:

    A very helpful discussion of Numberlink, thank you. The bit about “all the squares used” is inreresting. I only recently started enjoying Numberlink, after running into the same basic idea of not expecting to prove the solution unique on another site. But, at least so far, none of the “metalogic” I have used in doing Numberlink requres assuming that all the squares are used. “What happens at corners”, for example, follows just from assuming a unique solution. All the ways I can think of for producing a Numberlink problem with a unique solution that does not use all the squares are trivially equivalent to a problem that does use all the squares. I think realizing that helped make me a liitle more comfortable with the fact that all the squares are always used. It “almost” follows from uniqueness, which Nikoli always requires.

    What I do wonder about is how they really know there is only one solution. Even for most easy Numberlinks I cannot see how to prove uniqueness.

    • MellowMelon Says:

      That’s true that uniqueness pretty much implies all squares, although I can think of some theoretically possible counterexamples.

      I’m not sure there’s a uniform way to prove unique solutions. For some of them you can exploit some logic (like entrance/exit counting), but I think a lot of them require plenty of trial and error.

  4. linked_puffbird Says:

    Yes, there are counterexamples, but all the ones I could think of invovled obviously inaccessable squares or groups of squares. And they were all “trivial” in the sense that they could be converted to problems that used all the squares by moving some of the blockading clues into the inaccessible area, while leaving the solution outside that area unchanged. If you can think of any less trivial counterexamples, I would be curious to hear about it.

  5. Rajesh Kumar Says:

    Thanks very much for very nicely explaining this puzzle type.

  6. Aaron Says:

    I have 2 suggestions to add to this:

    1) Use the try button, often. Put the stuff you are relatively sure with normal markings, and try on the stuff you aren’t so sure of. This way you can hit delete if you screw up bad.

    2) If you can draw a diagonal line from one edge of the board to another, then there must be segments leading away from both ends of the line, along the direction of the edge of the board. (If it goes in the 2 directions toward diagonal line, then it creates a bogus corner at the other end.) This is particularly helpful with sparse numberlinks with long paths.

  7. Ara Says:

    Good numberlink problems

  8. Anthony Bailey Says:

    Although I agree the numberlink puzzle type relatively often requires some “free” exploration, I do use another “formal” technique to progress further without guessing.

    It’s another slant on Aaron’s second note above. When an incomplete line is along the edge of the grid, there are two ways it can go next: it can carry on along the edge, or turn in.

    A turn forces two rays of corners to run diagonally across the grid.
    For sake of a visual example that I can render with characters, suppose the line runs down along the left edge of the grid:


    If it turns right into the grid, here are the “corner rays” I mean:


    Without actually drawing them, you can mentally “fire” both of the corner rays diagonally across the board until they hit something. If both rays land safely (e.g. squarely around a given) then you’ve learned nothing actionable.

    But, if either ray hits a problem, (e.g. the opposite grid edge in Aaron’s note – but there are many other obviously problematic combinations of existing lines and givens) then you know the original turn was impossible, and can confidently extend the line along the edge instead.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: