Generating Interlocking Crochet Mazes

I am very excited that my interlocking crochet maze pattern generator is ready and free to use. This is a short post about what it is and why it exists.

Interlocking crochet is a fascinating technique which has grown into its own subfield of crochet. The standard variant uses square grids or meshes in two different colours that are interwoven as they are constructed in parallel, to create different designs. I want to say it’s easier than it sounds but honestly it took me a while to get my head around it. The grids are never attached to each other directly, so it is possible to unravel one grid completely without disturbing the other1. I find this quite topologically interesting. Due to the interwoven meshes, the reverse of the fabric has the ‘inverse’ design which looks surprisingly unintuitive. There is enough to say about interlocking crochet for a separate blog post. Anyway here’s a picture of one of my early experiments in interlocking crochet.

A fish motif

A couple of years ago I was playing around one evening and had a few realisations in quick succession:

  1. Interlocking crochet can be used to make a certain class of grid-based designs, which includes mazes.
  2. Mazes can be generated by a variety of maze algorithms.
  3. Maze diagrams can be converted to interlocking crochet patterns by following a set of fiddly but straightforward rules.

The first interlocking crochet maze I ever made.

From that point the way forward was clear. Interlocking crochet pros can work directly from a diagram without a written pattern, but I find that far too mentally demanding. I like to listen to podcasts and things while I crochet and I can’t do that while counting and calculating every few stitches. So I mainly made this for myself, and if anyone else finds it useful I will be over the moon.

As far as the technical details go, the maze algorithm I used is recursive backtracking because it makes the nicest looking mazes. The tool is a Shiny app written in R and hosted on shinyapps.io.

There are many things I want to add to the app eventually. In rough order of increasing complexity:

  1. Rewrite the maze algorithm to be non-recursive, to be able to generate larger mazes without running into stack overflow issues (for v1 I had to limit the maze sizes to at most 15x15 because of this).
  2. Cylindrical mazes - this will involve changing the maze algorithm a little, and the pattern translation a fair amount.
  3. Rectangular mazes with a centre section cut out. It would be nice to have a maze that ‘frames’ something else in the centre of the piece.
  4. Options of different maze algorithms or parameters, to generate mazes with different characteristics.
  5. Allow the user to choose whether the pattern uses the convention of front and back stitches referring to the right/wrong side of work or the crocheter’s perspective. Different designers use different conventions but I think most people would have a preferred convention and it shouldn’t be hard to incorporate that.
  6. Allow the user to set the seed for reproducibility! (Or perhaps special significance of a particular pattern? Birthday mazes?)
  7. Extend the pattern translation to convert any suitable grid-based diagram into an interlocking crochet pattern. I’ve got lots of sketches this will be useful for.
  8. Add diagonal stitches - this will be rather hard, but will unlock the exciting territory of blackwork embroidery diagrams. Kathryn Clark, @hackovani_cz and Kate Dudman are pioneering things in this area.
  9. Triangular meshes instead of square. This feels like it will be a big paradigm shift especially as I can barely follow written patterns for these in the first place. But hexagonal mazes are a thing. Kathryn Clark and Kate Dudman are pioneering things in this area.

If you reached this far, thanks for reading all about my rather niche project!


  1. In practice it is fiddly, but I’ve done it before with small pieces to satisfy myself that it’s true.↩︎

Avatar
Aranya Koshy
Data Scientist