Linesweeper (Knight)

Draw a single loop which does not intersect itself by connecting pairs of cells which share an edge. The loop may not pass through any clue cells. Numbers indicate how many of the cells which the clue can see¹ are passed through by the loop. (Question marks indicate any number is possible for that clue.)

¹ In the diagram below, all cells that the star can see are highlighted in green

Knight touching

The raw text csv file is available here. (If you can't access pastebin, it is also in the source code of the post – click edit or improve this post to find it.)

  • $\begingroup$ Do you have this as an Excel/Google Sheets grid? $\endgroup$ – bobble Aug 12 '20 at 22:44
  • 1
    $\begingroup$ @bobble I've added a link to a .csv file, if you download it and add the correct file extension, you should be able to open it in Excel $\endgroup$ – boboquack Aug 12 '20 at 22:53
  • $\begingroup$ It's a little confusing to say touching when you mean a knight's move away. Is the loop also supposed to consist of knight's moves? Or is it only for clues where the knight's move matters? $\endgroup$ – Rob Watts Aug 12 '20 at 23:11
  • 1
    $\begingroup$ I reckon the wording would be better if it said how many cells of the loop each clue ‘sees’ and the diagram shows the cells the star can ‘see’ $\endgroup$ – Beastly Gerbil Aug 12 '20 at 23:20
  • $\begingroup$ @RobWatts The loop connects pairs of cells which share an edge. The knight's move condition only applies to clues. $\endgroup$ – boboquack Aug 13 '20 at 0:39

Here's the path (in green):

Final path

My first step was to go through each one and mark (in orange) all the squares that could be seen by a zero. I marked the question mark and zero clues in red to help me keep track of which ones I'd taken care of already, and the non-zero clues in blue.

First step

The next step was to mark in yellow the paths that were dead ends, and also labeled each path of an intersection with a letter so I could easily see which paths connected which intersections

Second step

To get from here to the end:

I just noticed that path N and path S each go past a "1" clue more than once. This means neither of those paths can be taken. It wasn't very hard after that - for example, in the NOPQ intersection N is no longer an option, and we have to use O or Q to satisfy the nearby 1. If we use Q and P the loop would cross itself, so we use O and P.

  • $\begingroup$ Nice job! I notice that you've included the 0 in the middle of the middle of the yellow 'star' as a red cell, but I'd argue that it should actually be blue. Can you see why? (Perhaps that will tell you a bit more about how the puzzle was constructed...) $\endgroup$ – boboquack Aug 13 '20 at 2:29
  • $\begingroup$ @boboquack I marked them in blue to make sure that I would easily see that the path needs to go by them, which is why I would not mark that 0 in blue. As for the structure, I noticed that you made heavy use of three zeros in a row with the middle one offset to make vertical or horizontal corridors, and that those corridors form squares through the whole puzzle. $\endgroup$ – Rob Watts Aug 13 '20 at 15:52
  • $\begingroup$ Makes sense. Although if you want to look behind the scenes, this image shows exactly why I would argue the 0 doesn't fit in the pattern. (edit: oops slightly wrong image) $\endgroup$ – boboquack Aug 14 '20 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.