Naughty Nathan Junk from the mind of a Tech Artist…

January 6, 2011

Labyrinth – 16×16

And here’s a big one!

Filed under: Labyrinth,Puzzles — Naughty @ 10:52 pm

Labyrinth #6 – 8×8

I have a vast backlog of these 8×8 (easy) puzzles so I’m posting quite a few together. More tomorrow and over the weekend…

Filed under: Labyrinth,Puzzles — Naughty @ 10:50 pm

Labyrinth #5 – 8×8

Filed under: Labyrinth,Puzzles — Naughty @ 10:48 pm

Labyrinth #4 – 8×8

Filed under: Labyrinth,Puzzles — Naughty @ 10:46 pm

October 30, 2010

Labyrinth Tutorial

This post is a step-by-step tutorial which will show you how to solve an example 6×6 Labyrinth puzzle with an explanation of each and every step. This tutorial covers most of the basic ideas behind solving Labyrinths but assumes you already have a basic understanding of both Labyrinth rules and Hanjie/Picross logic (which is the basis of labyrinth logic).

If you don’t already know the general rules of Labyrinth, or anything about solving one, please take a look at my general guide to solving labyrinths before going through this tutorial.

You can find an explanation of Hanjie/Picross logic here.

This is the Labyrinth puzzle we will be solving.
At each step we will be filling in some walls or path (or both!) and any previous steps will be faded out slightly to better highlight the current step. Always draw your walls from grid intersection to grid intersection and your path from square center to square center, and always try to draw walls and paths in a different colour if possible, as this makes it far easier to see what is going on and what you are doing.

Step 1
The first thing you should always do is to fill in the corners. Any time that the labyrinth walls form a concave corner (and this of course is also true for the ‘outer’ walls) you should immediately fill in the path as a corner. The only exception to this rule is when the corner contains the Start or End markers, as these obviously denote a dead-end. In this step we draw three path corners and leave the top-left corner alone as it contains the (S)tart.

Step 2
The immediate next step should be to look at all the numbers and fill in any walls using standard Hanjie logic. In this step we can draw one section along the top row, as there is a wall of length 3, so wherever it is on the row that section must be a part of it. Notice how we could only make this assumption because we’ve already knocked out the last section on this row (when we marked it as a path in step 1).
The third row has a wall of length 4, so we know that the middle two sections must be wall (standard Hanjie logic!).
Finally the first column also has a wall of length 3 so we can insert 1 section of wall there too.

Step 3
Every time you create a ‘corridor’ between two walls you can draw in the path down it. ‘Corridors’ are created whenever a wall exists on both parallel sides of a square. In the previous step we created two short corridors so now we draw the path in. Remember that we always draw the path from square center to square center.

Step 4
Now we have drawn those paths in we have effectively shortened the possible wall area on the second and third grid rows. For this reason we can go back and apply the standard Hanjie logic again and two more wall sections present themselves.

Step 5
Ooh look! Filling those two bits of wall in last step created another corridor so immediately we draw the path in along it.

Step 6
Now we have to go back to some more Hanjie logic. If we look down the last column, denoted 1 1 we can see that the path we just drew splits the column area in two. We know that we need to have 2 separate walls both of length 1. There isn’t enough room in the bottom half to fit both of them with a gap so one of them has to exist in the single gap left at the top above the path split. We can therefore draw this in.

Step 7
The previous step again created a small section of corridor so we can draw some more path in. Two previously separate sections of path are now joined.

Step 8
Our path cannot form any kinds of junction so this step we can close off another section of wall where our path made a corner. In the same way that path corners can be drawn in when walls form a concave corner, so too can walls be drawn in around path corners.

Step 9
Now checking back at the row numbers, we can see that the last section of wall we drew in the previous step completes the wall of length 4 for this grid row. Consequently we can fill in any remaining gaps on this grid row with vertical paths which, as it turns out, is only one but it happens to connect to the (E).

Step 10
We know that the (S) and (E) marker squares have to be dead-ends so, as we’ve already discovered the path exit point for (E), we can draw in walls around all the other edges of it.

Step 11
Looking at the column where we drew one of the previous walls in (denoted 1 1) we can see that it contains two wall sections, both 1 length. Well we just drew a wall of length one in that column, so we can mark off either end of that vertical wall with a path. We could have also done the same to the right of the second, horizontal wall section we previously drew too, but one thing at a time! 😉

Step 12
After all that solving we’ve ended up with several more concave wall corners again. We can draw these in without further ado.

Step 13
In this step we can easily determine where a new path section should join up two existing path sections. This is because there was no other direction for either path end to go, other than where we filled in. No section of path can simply stop in a dead-end, go back on itself or create a junction, so this is the only possible outcome.

Step 14
This is not an actual step, but an example of an invalid move to consider. We know that a path connection here is impossible as it creates a closed loop, which is not allowed. Knowing where a path or wall cannot be is often just as important for progressing and solving a labyrinth as any other technique. If there cannot be a path across this section it MUST therefore be a wall (and vice-versa).

Step 15
Therefore we can draw in a wall here. As it happens we could have simply deduced that there was a wall here due to the fact that a wall of length 3 belongs on this row and it has to go here, but this is not always the case so it’s important to remember this subtle idea.

Step 16
Again with the ‘corridors’. We can draw in two sections of path where we just created two corridors.

Step 17
Now we have a complete path in the upper half of the grid it only leaves us to fill in the missing walls. They can and must go in only one possible formation, so we don’t have to work anything else out to fit them all in.

Step 18
Returning again to our standard Hanjie logic we can see two more columns where we can fill in our required wall lengths. In the bottom left goes our wall of length 3, and in the bottom right our second section of wall length 1.

Step 19
Fill in the path along this newly created ‘corridor’.

Step 20
Earlier, in step 11, we inadvertantly exposed a corner in the path. Now we can draw a wall around this corner (we could of course have done this at step 11 too if we’d wished!)

Step 21
Drawing in the section of wall in the previous step showed us where the only wall section on this grid row must start. This means we can now fill in the neighbouring section to complete our wall of length 2. This also means there is no more wall on this grid row so we can additionally fill in vertical paths in any remaining gaps.

Step 22
Yet another corridor created that we can path through.

Step 2
Two more path corners have appeared, this time side by side, so we can draw in a dividing wall.

Step 24
This last wall completes all the wall sections for this grid column, which means we can now fill in path sections across all the remaining gaps.

Step 25
Another concave wall corner means another path corner can be drawn in.

Step 26
Approacing the last few steps is usually a formal matter of filling in the obvious walls and paths, and this puzzle is no exception. We know the wall of length 2 must go here as the existing path dictates that is has to.

Step 27
Two more wall sections can be filled in. In this case either by looking at the numbers to see where wall sections are missing or by simply blocking off the corners the path has made.

Step 28
The last step is simply a case of filling in the last section of corridor that has appeared, which here makes a nice corner.

Step 29
Here is the finished Labyrinth puzzle. Notice how, in direct contrast to Hanjie, probably more than 50% of the puzzle was actually solved without any reference to the numbers, but rather by logical deduction about where the path or walls must be based on the single fundamental principle that the path must travel from (S)tart to (E)nd visiting every square in the grid without junctions, overlaps or dead-ends.

Filed under: Labyrinth — Naughty @ 11:27 pm

September 9, 2010

Labyrinth #3 – 8×8

Filed under: Labyrinth,Puzzles — Naughty @ 10:46 pm

September 5, 2010

Labyrinth puzzles in print!

Woot! Some of my puzzles have been published in a Sudoku Magazine! Sudoku Xtra by Dr. Gareth Moore is a really nice puzzle magazine that contains loads of cool and unusual variations on the standard 9×9 sudoku, as well as a ton of new puzzle types each month. If you like logic puzzles check it out here:

My puzzles first appear in issue 10, but I’ve submitted a ton of puzzles so hopefully they will be making return appearances in future issues too! 😉

I’ll be posting some new 8x8s here shortly…

Filed under: Just Stuff,Labyrinth — Naughty @ 10:56 pm

June 5, 2010

Protected: Labyrinth for Maya

This content is password protected. To view it please enter your password below:

Filed under: Labyrinth,MEL / Maya,Python — Naughty @ 10:21 pm

June 4, 2010

Labyrinth! Hanjie/Picross based puzzles

Labyrinth is a new puzzle I recently discovered that takes the logic of Picross/Hanjie and adds a new dimension. Here’s a very simple 6×6 sample:

Each labyrinth puzzle consists of an empty board with a series of numbers along the left and top edges and a Start(S) and End(E) point marked (as seen above). The goal is to fill in a complete labyrinth of walls, tracing a continuous path from Start to End, visiting every square on the board grid once and once only.

As mentioned before, solutions are derived using the same logic rules as Picross (trad. known as Hanjie) so if you’ve played either of those games before, labyrinth should be very easy to pick up.

Walls and path may only be drawn horizontally and vertically, the walls are drawn along the grid lines and the path is drawn from square to square (center to center).

The numbers given along each edge denote how many wall sections there are on that grid line, and how long each section is. For example:

means that along this particular horizontal grid line there are four separate sections of wall. The first wall is 2 grid units long, followed by a wall a single unit long, followed by a wall 3 grid units long and finally another wall 1 unit long. There must be at least one segment gap between each section of wall and the sections are always drawn in the order shown (i.e. 2 first (leftmost), then 1, followed by the 3, and finally (rightmost) a 1). Because the grid in this example line is only 10 units wide, there is only one possible solution:

and once we know where there is no wall we can mark the path in:

However, you will not always immediately know where all the wall segments go, for example the following line is not so conclusive:

Still, no matter where the 6-length wall actually is on this line we can be sure that the two central spaces must be occupied by it, so we can mark those in right away:

the remaining four sections of this wall will have to be deduced later by some other method but, for arguments sake, lets assume that sometime later on we are able to add a path line here:

we can now safely deduce that the first two squares must also be paths (otherwise we’d have TWO wall sections, one of 2 and one of unknown length, and our edge numbers for this line clearly show there is only a single wall of length 6). It is obvious now that the wall has to start from at least the fourth grid section, so we know it must run up to at least the ninth, as it’s 6 long. We’re only 1 square off completing this line now:

As you can see this is typical Picross/Hanjie logic.

Once we have one full section of wall in we can draw some of the path in. For example if we somehow end up with this:

It will immediately give us:

and then, because we can see that the only other wall on this row is on the right of the 4 wall we know that there can’t be another wall in the first square, so it must also contain a path:

the 1-long wall must be in one of the remaining 3 grid spaces.

We can see that drawing the walls helps us to determine the path, and drawing the path helps us to determine where the walls are.

Common Tips:

The path always starts from S and terminates at E and must visit every square on the grid once and only once. This is a key factor in solving every labyrinth puzzle as in certain common situations it helps dictate where a wall or path can or cannot be. For example, in any labyrinth there cannot be any T-junctions, crossroads or dead-ends (except S and E which have to be dead-ends!), therefore, in any situation where adding a wall would cause a dead-end you know it must be a pathway.

Corners – One situation where this crops up the most is in corners. Wherever and whenever you find an inside corner you can always draw the path straight away (unless it has a S or E in it!). Take the following scenario for example:

Without even bothering to check or consider where any other walls or path may be we can immediately fill in the paths inside each and every corner as so:

This then immediately provides us with another wall clue:

which in turn gives us another corner to fill the path in at…

Finally, if you consider the right-hand portion of the labyrinth in the above image, we can deduce that the path CANNOT run horizontally (highlighted in blue) as this would produce an invalid path loop. Therefore there must be a wall there, which in turn means the path must run downwards (highlighted in faint pink)

0 (zero) walls – If the wall sections number is 0, meaning there are no wall segments along this line you can immediately draw paths between every set of squares along this grid line:

This is also true whenever you have filled in all the given wall segments on a line:

means you can fill in the rest like so:

S and E side by side – If the S and E are ever alongside one another you can immediately draw a wall between the two as so:

Vertical grid lines follow exactly the same principles as all the examples above, except vertically! 😉

There should only ever be one possible unique solution per puzzle and no guessing is required.

Here’s a sample solution (to the example 6×6 labyrinth shown at the start). Notice how the path is a single continuous line from S to E and it visits every square on the board without splitting or crossing itself.

Finally, here’s a couple of easy 8×8 puzzle to try (dump them into photoshop or print them out)

I’ll be adding more puzzles frequently, and shortly a Maya python script to play them dynamically in 3D!!
Have Fun!

Filed under: Labyrinth — Naughty @ 9:31 pm

Powered by WordPress