Jonathan Olson

Introduction to Solving

If you're new to Slitherlink, the Wikipedia article is a great starting point. There are also excellent resources and guides available online.

It is highly recommended to avoid guessing, and instead to use logical deductions to solve the puzzle. Guessing is great for learning, but makes solving larger puzzles disappointing when you realize you made a mistake!

Marking X's

Marked X's where lines cannot go

One common technique is to mark cells where lines cannot go with an "X". This helps to visualize where lines must go.

Basic Patterns

Some of the patterns only apply to puzzles that are larger than the pattern (i.e. they assume that a small loop would not be the solution to the entire puzzle).

Lines and Dots

Since the loop cannot cross itself, this means each dot will have either zero or two lines connected to it.

Two lines connected to a dot prevent any other lines connecting to that dot.
Note: When you see the left pattern when solving, you can mark the changes on the right.
If there is one line connected to a dot, and all other potential lines are marked with an X except for one, that line must be connected.
If there is only space for one line to connect to a dot, no lines can connect to that dot.

Borders are X's

For patterns, it is useful to treat the border of the puzzle as if it extended out and was marked with X's. This applies to corners and edges, and is useful for starting a puzzle!

The corner on the left is equivalent to the (extended) example on the right by adding X's.

No Loops

If a line would create a small loop (that is not the solution to the entire puzzle), it cannot be connected, and can be marked with an X.
Similarly, any "forced" loops can be marked with X's. Here, a line going up would create a square loop.

Basic Numbers

Lines and X's can sometimes be deduced just from the number of a cell.

No lines can surround a 0.
A single X on a 3 will result in lines.
A single line on a 1 will result in X's.
Three X's on a 1 will result in a single line.

Corner Cases

A 1 in the corner will get two X's (remember, corners are like X's!)
A 3 in the corner will get two lines (remember, corners are like X's!)
This is the general case for a 2 with corner-like X's. If it is in a true corner, you will get two lines.

Edge Cases

Annotated Example

Given the patterns above, let's solve a simple puzzle.

Our starting puzzle.
We can mark X's around all of the 0's in the puzzle.
There is a 3 with an X, so we can fill in lines.
There are two dots that have two lines each; other potential lines get X'ed out.
This also applies for the corner dots (but it may be harder to see).
We have two vertices where a single line meets two X's. They both must take the only remaining path.
Similarly, this happens for the edge dots (the implicit X's at the corner apply).
Let's apply a more complicated pattern: the 3 has a dot that, while not in the corner, matches the corner-like pattern. It gets two lines.
We created a joint-like two lines on a dot, so we mark in the remaining X.
A 3 with an X can have its remaining lines filled in.
We can use the "line on a 1" and "X's if there are two lines on a dot" rules to fill in some additional X's.
We can repeatedly add lines where there are no other options (either edges, corners, or X's on all other options).
A 1 with a line will create X's.
We finish the puzzle with forced lines!

Common Patterns

Sectors and Parity

Only One

It is useful to mark sectors (adjacent pairs of potential lines) with a few properties. The most powerful marking says that "exactly one of these will be a line, and the other will be an X". We denote this below by drawing a red curve between the two potential lines.

If a pair of edges of a 2 will have exactly one line, then the other pair will also have exactly one line.

On square grids, this property also applies across a dot to the opposite sector:

If a pair of edges of a 2 will have exactly one line, then the other pair will also have exactly one line.

Thus the only-one sector property will propagate across a chain of diagonally-connected 2s (in a square grid)!

This type of parity arises naturally in many common situations:

It is particularly powerful, not just because it can propagate across 2s, but many of the reverse cases directly deduce lines or X's:

Whenever there is a line or an X in a sector with "only one" line, you can immediately mark the opposite!

The only-one sector can solve the following example patterns, but much more:

Not One

A dual to the "only one" sector is the "not one" sector. This is a sector where either both are lines or both are X's. We will mark this with two blue curves between the two potential lines.

This comes up most naturally with 2-in-a-corner pattern. Note that this also includes only-one sectors, and can be incredibly constraining. In this case, the upper-left of the 2 ALSO has the not-one sector property, but isn't marked visually by the system due to the triviality (only two places for lines).
Not-one sectors propagate across dots in square grids.
Not-one sectors also create the 2-in-a-corner pattern.

Using the above patterns, it follows that any diagonal chain of 2s will propagate the not-one sector property across the entire chain!

Not Two and Not Zero

Similarly, we can mark sectors when we can rule out two lines or zero lines. We will mark not-two with a single dashed orange curve, and not-zero with a double dashed green curve.

Not-two sectors naturally form around a 1.
Not-zero sectors naturally form around a 3.
If a sector is a not-zero, then any opposite sector is a not-two.

Sector Combinations

When rules overlap and you would mark multiple sectors on a single pair of potential lines, you can combine them into more precise states:

  • Not-zero (green) and not-one (blue) => both are lines!
  • Not-two (orange) and not-one (blue) => both are X's!
  • Not-zero (green) and not-two (orange) => only-one (red)
This rule can be directly derived from the above sectors rules directly. Each 3 creates not-zero sectors, and the not-two sectors propagate across the diagonal. Since each pair of potential lines has not-zero and not-two, it is equivalent to only-one. Previous sectors rules show what only-one with a 3 combines into.

Common Sector Patterns

Parity

The following rules are very powerful when combined. They represent the concept of parity, in general the concept of even/odd.

Most notably, if all but one sector of a square are marked with only-one or not-one, you can deduce the last sector! If you look at any closed region in the puzzle (e.g. a square, but it can be arbitrary), the number of times the final loop will cross it will be even. Every only-one sector is a "crossing" of our square, and every not-one sector is a "non-crossing".

For example, in a square:

  • Three only-one sectors => four only-one sectors (last corner is only-one)
  • Three not-one sectors => four not-one sectors (last corner is not-one)
  • Two not-one sectors and one only-one sector => two of each (last corner is only-one)

For a concrete case of parity in action, see this reddit thread.

Alternative Representations

The classic form of dots and X's can be harder to use in a few ways:

  • The implicit "lines between dots" can be hard to visualize multiple pathways (particularly for coloring/Jordan curve solving).
  • The implicit "lines between dots" doesn't work as well for non-square grids (harder to visualize the potential shapes).
  • The X's can be awkward on non-square grids (they look weird either rotated or non-rotated).
  • Sectors are not as clear with the implicit lines.

For example, the same puzzle is represented below with two methods. The left "arm" of the puzzle (with the 3) needs to connect back to the rest with two line paths. There happens to be a "cut" (marked in red) where there are only two places for lines to pass through (at each endpoint of the red line). Making the possible paths explicit helps identify this type of case.

In these other representations, "lines" are drawn with a thick, bold style, "possible lines" are drawn with a thin style, and X's are represented simply by the absence of a line.
It is also possible to mark the location of X's with other styles.

Alternative Tilings

Any planar graph or tiling can be used to make a puzzle.

Each of which has different rules:

However, it is possible to create/compute "general" rules that work across tilings:

All of the above rules are represented by this form (will be described later in the technical details, but red circles denote "all other unspecified potential lines get X'ed").

Coloring

Since the loop is a Jordan curve, it divides the cells into two regions, one inside and one outside. This can be used to deduce lines and X's, or even to solve directly.

Coloring is where we mark the deduction "this cell will be in the same/opposite region as this other cell".

In this solved puzzle, the outside is white, and the inside is gray.

A common way of solving with coloring is to mark colors just for the inside and outside of the loop.

Inside/outside colors marked (not using general coloring, so lines are highlighted for visibility).

However, this is less helpful on larger puzzles, where we may be able to deduce coloring information in the middle, and it is far from any inside/outside coloring.

When coloring, conceptually we get pairs of opposing regions (where every cell in the two different regions is of opposite color, and every cell in the same region is of the same color).

To be able to solve with this information, it helps to use a single color hue for each region pair, but picking a lighter color and darker color to indicate the "opposite" regions:

Pairs with a lighter and darker color with the same hue will be on opposite sides of the loop. Note how coloring can be disconnected (the upper-right pair of 3's forces the left and right cells to have opposite colors), and the only-one sector from the 1 in the bottom right also does the same. Note the single-color region in the middle-to-upper-left: if it where white (outside), it would split the puzzle into two disconnected regions (the upper left would be isolated), which is not valid. Thus we could mark it as being the "inside" color!
We can also display and solve using only the coloring information.

This user interface tries to make colors as clear as possible (where pairs that are close to each other will have different hues).

Additionally:

  • Every line will force its adjacent cells to be of opposite colors.
  • Every X will force its adjacent cells to be of the same color.

The opposite is also true:

If two adjacent cells have the same color, they must be separated by an X.
If two adjacent cells have the opposite color, they must be separated by a line.

We can work within the coloring system with a few fundamental patterns:

Checkerboard-like patterns aren't allowed (i.e. there cannot be four lines on a dot).
Another way checkerboard-like patterns aren't allowed.
Maximum of two lines per dot.

Many of the usual rules carry over, but some useful ones:

Colors and Sectors

Coloring can also directly imply sectors.

Opposite colors are equivalent to only-one.
Same colors are equivalent to not-one.
Only-one is equivalent to opposite colors.
Not-one is equivalent to same colors.

Both sectors and colors can propagate or be joined across disparate parts of a puzzle, and thus can be very powerful.

Highlander

Since valid puzzles must have a single unique solution, we can actually apply additional deductions (generally based on which cells are blank). These are called highlander patterns ("there can be only one").

The core idea is that if adding a line or an X would result in a pattern that would always allow two solutions to exist, then that line or X is wrong (since there is a unique solution), and the opposite must be added.

This can be considered to be less pure, since these pattern rules are incorrect if the puzzle has more than one solution, since they are based on the assumption that there is a unique solution. If used on a puzzle with multiple solutions, it can lead to finding no solution! Furthermore, puzzles are logically solvable without using highlander deductions.

However, highlander deductions can be very powerful, and can be used to solve difficult puzzles quickly. Many people rely on it as a key technique.

Patterns like this generally rely on certain cells being "blank" (i.e. not having a number), since that allows for multiple solutions to exist. For highlander patterns, we will mark cells that can have numbers with question marks.

The classic example of a highlander rule is the following:

If a 2 has all four adjacent cells empty (no numbers), and has the double-X corner that forces it to be one of two different configurations, then allowing the upper-left corner of the 2 to have the same double-X would create two solutions.

For example:

Can you find the highlander deduction in this puzzle?
If there were X's at the red circles, then the blue and green paths would be interchangeable, creating two solutions regardless of the rest of the puzzle (since there is no way for the rest of the puzzle to influence the choice between the blue and green path).
Thus this highlander deduction is valid if the puzzle has a unique solution.

Common Highlander Patterns

Here is a sampling of common highlander patterns:

Some of these are pretty hard to believe! Of note: they cannot be combined to make larger "combined" highlander rules, since they need the exact pattern to match. The pattern explorer can actually list out all of the "excluded" solution patterns for each highlander rule (click on it), showing another solution that rules it out.

For example, see analysis for the first highlander case, or analysis for the last highlander case. Note that the "highlander duplicates" are given in groups (usually pairs), showing which solutions are excluded and why.

The most counter-intuitive thing about excluded solutions (that I swear I have verified logically) is that it is possible to exclude solutions based on "duplicate" solutions that are not possible with the current state of X's and lines! The highlander condition applies to the base puzzle (the numbers and grid), so just because you might have deduced some lines and X's doesn't prevent ruling out things using solutions that contradict those deductions.

Loops and Regions

Below is a case (with two representations) where there is a constriction: if certain moves are made, it will split the puzzle into two disconnected regions.

When thinking in terms of lines and X's: The blue loop goes through only two paths that could have lines. The rest have X's. Since the blue loop has lines on the inside and outside, there must be at least 2 lines connecting through it so that the puzzle doesn't split into two disconnected loops. Notably, any closed loop that you can draw must have an even number of lines through it!

When thinking in terms of colors: The blue line goes through only two colors: the outside (white) and another color (marked with purple). If the purple-dashed color turns into the outside (white) color, it would cut off the region in the blue loop from the rest of the puzzle. Therefore the purple color must be the inside color (gray).

These can also be internal, or with arbitrary colors, as seen above. The interior loop needs to be connected to the outside.

The two colors can actually alternate back-and-forth, and be present in multiple locations, like the example above. Here, both purple-dashed regions are the same color, and for similar reasons they must be the "inside" color (gray).

More Patterns

There are many more patterns for Slitherlink. The above are just a few of the most common ones.

Pattern Explorer

I have computed a large number of patterns, and you can browse them in the pattern explorer.

Fundamentally, there are 5 different databases of patterns:

  • Edge (no colors/sectors)
  • Color (no edges/sectors)
  • Edge + Color (no sectors)
  • Edge + Sector (no colors)
  • Edge + Color + Sector

It also allows filtering by:

  • Highlander
  • Numbers/red (helpful for finding "starting" patterns that don't need lines/colors)
  • Compatible Tiling

Clicking on any pattern will take you to a page that displays more information about it, and shows how the pattern might work in different tilings.

Practice

To learn patterns, I would highly recommend using the interactive app. Generate a puzzle, solve all that you can, and when you get stuck, hit the "hint" button.

It should show you a new pattern that you missed. This is great for learning new patterns!

If you do not understand the pattern, you can click on it to see more details. Try to see if there is a "solution" that breaks the pattern (i.e. satisfies all constraints, and has no loops). This can help you understand why the pattern is valid.

Additionally, please let me know if I can fix or update anything in the app or on this page!