gereleth / hexapipes

Hexagonal pipes puzzles
https://hexapipes.vercel.app/hexagonal/5
MIT License
187 stars 19 forks source link

Ambiguity in Hexagonal wrap 10x10 756 #24

Closed Lanzaa closed 2 years ago

Lanzaa commented 2 years ago

In the 10x10 hexagonal wrap puzzle 756 there is an ambiguous section.

Here is the nearly finished puzzle with the ambiguous area unfinished: nearly done 756.

gereleth commented 2 years ago

Oops, looks like you're right. Thanks for reporting!

I'll check how the generator sneaked this in :/.

gereleth commented 2 years ago

Seems like there's a bug in my solver that causes it to miss this kind of ambiguities. Here's an example of a 3x3 non-wrap puzzle with the same pattern. The solver reports a single solution in this case too but it's clear that the right side could go two ways =(.

image

I'll need to dig in to see why this happens.

gereleth commented 2 years ago

I have found the bug. It looks like 528 puzzles out of 12000 total were affected. Most of the affected puzzles have two solutions with an occasional 3 or 4. Here's an example of a fun spot that produces three different solutions:

an example of tiles configuration producing three different solutions

I'm going to replace some tiles in the affected puzzles to enforce a unique solution.

Thanks so much for bringing this to my attention! I played a whole lot of the puzzles and never noticed =).

gereleth commented 2 years ago

Ok, on a more accurate count this concerned about ~260 wrap puzzles. All the non-wrap ones were fine.

I have replaced some tiles in the affected puzzles to remove the ambiguity. Number 756 now looks like this (with the same four tiles left unlocked).

Hopefully there are no more puzzles with multiple solutions but if you notice any please open a new issue.