Bug 351831

Summary: Hint function may destroy valid partial solution if ambiguous
Product: [Applications] picmi Reporter: Martin Walch <walch.martin>
Component: generalAssignee: Jakob Linke <jakob>
Status: CONFIRMED ---    
Severity: normal CC: ped
Priority: NOR    
Version First Reported In: 2.0.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Conflict of ambiguous solutions and "Hint" function in picmi.

Description Martin Walch 2015-08-27 00:12:07 UTC
Created attachment 94236 [details]
Conflict of ambiguous solutions and "Hint" function in picmi.

When solving a puzzle with ambiguous solutions it is possible to get to a state where the fields that have been filled are congruent with those of one of the valid solutions, i.e. it is possible to solve the puzzle by only filling the remaining empty fields.

However, if they are not congruent with the original image, getting a hint may fill a field or change a field that has already been filled in an inconsistent way, i.e. afterwards it is not any more possible to solve the puzzle only by filling in the remaining empty fields.

See the attached screen capture for an example.
Comment 1 Jakob Linke 2015-08-27 08:44:47 UTC
Thanks for the report. The reason for this (as well as all other related ambiguous solution bugs) is that random puzzles are indeed simply random and we don't ensure a unique solution exists. In this specific case, hints simply compare the current user solution against the 'real' generated solution and flips on mismatched tile. I currently don't have any plans to add a more sophisticated generator/solver but patches are welcome.