On Apr 6, 10:32 pm, James <rent.lupin.r...@gmail.com> wrote:
> A puzzle I'd not seen before appeared in a recent copy of The
> Independent, called Slitherlink.
>
> Seehttp://en.wikipedia.org/wiki/Slitherlinkandhttp://www.puzzle-loop.com/
>
> To quote the rules verbatim:
>
> "Draw a single loop by connecting together the dots [on the grid] so
> that each numbered square has the specified number of adjacent line
> segments. Dots can only be joined by straight horizontal or vertical
> lines. The loop cannot cross or overlap itself in any way."
>
> Although fun to solve the puzzles manually, I've been wondering about
> possible approaches to solving the general case recently, too.
>
> Does anyone have hints or tips on how you might go about creating an
> algorithm to solve Slitherlink puzzles? I'd prefer not to be overly
> spoiled so I'd appreciate it if you didn't spell it out :)

<snip>

Took some time to think about this one. I'd start with the
numbered squares. There is only a limited number of
possibilities there: 0 has one, 1 has four, 2 has six,
and 3 has four.

That would eliminate the four surrounding edges from
the available list.

Then I'd search for a combination of positions that didn't
violate the conditions immediately, then try to link the
groups together with the edges that remain. Sorting the
groups by shortest Manhattan distance from the end
point I'm trying to connect.

--
Geoff

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to