Bug 471421 - RFE: please provide solution to games
Summary: RFE: please provide solution to games
Status: REPORTED
Alias: None
Product: kshisen
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Frederik Schwarzer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-25 06:26 UTC by cornel panceac
Modified: 2023-06-26 14:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cornel panceac 2023-06-25 06:26:44 UTC
SUMMARY
***
Version is: 1.1..23042

Suspicion is that "Create solvable games only" does not create solvable games only.
Therefore, it would be helpful to see the solution to the games when the relevant check box is checked.
***


STEPS TO REPRODUCE
1. Check the "Create solvable games only" checkbox in the game settings.
2. Play a game , reach the "No moves left" point.
3. 

OBSERVED RESULT
There's no way to see if a solution actually exists and what is it.

EXPECTED RESULT
There's a way to see the above.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Frederik Schwarzer 2023-06-25 15:31:21 UTC
The algorithm for creating a solvable board is pretty basic.
It creates a shuffled board and then tries to actually solve it. Only if it succeeds, the board is used.

If you think you found an unsolvable board, can you please use the Undo action until the board is in its initial state and then use Hint and remove the tiles that are shown repeatedly. That way, the game should be solvable. If it is not, there is a bug.
Comment 2 cornel panceac 2023-06-26 14:19:23 UTC
So i've followed your advice. After pressing Undo several times (~ 30) i've followed all the hints offered. The game was played differently but in the end i've got the same result: "Game stuck. No more moves possible."

At this moment i've figured a new issue: i can not tell you what game is this. There's no ID to report in order to identify which game is affected.

So, maybe this is another possible improvement: to provide the game ID.
Still, while i _believe_ i've followed the hints accurately, i'm still a human and i may have made mistakes. So i still see a value in the game playing the solution by itself, eventually with some kind of speed control.
Comment 3 Frederik Schwarzer 2023-06-26 14:52:45 UTC
OK, thanks for testing.

Yes, having game IDs would be nice. The current way to generate games does not make this easy, however.

I will give this a go and check if I can reproduce the issue.
If the game is built from source with DEBUG enabled, the "H" key not only shows a hint but removes the tiles. That way it is possible to quickly see if a game is solvable. ... But well, the algorithm is quite crude and if the game is not able to solve the game, there might still be ways to fix it. ... So it it not 100%.