Bug 242300 - "Generate A Puzzle" hangs when big games like 16x16 or 25x25 games are chosen
Summary: "Generate A Puzzle" hangs when big games like 16x16 or 25x25 games are chosen
Status: CONFIRMED
Alias: None
Product: ksudoku
Classification: Applications
Component: general (show other bugs)
Version: 0.5
Platform: openSUSE Linux
: NOR grave
Target Milestone: ---
Assignee: Johannes.Bergmeier
URL:
Keywords:
: 245756 278870 325199 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-20 22:32 UTC by Frank Schaefer
Modified: 2018-07-07 16:55 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Schaefer 2010-06-20 22:32:24 UTC
Version:           0.5 (using KDE 4.4.4) 
OS:                Linux

When trying to start the games

Sudoku 16x16
Sudoku 25x25
Roxdoku 16 (4x4x4)
Roxdoku 25 (5x5x5)

the "Play"-button hangs (keeps pressed) and the game doesn't start.

Reproducible: Always
Comment 1 Frank Schaefer 2010-06-20 22:45:11 UTC
After waiting for ~20 seconds, Sudoku 16x16 finally starts.
Sudoku 25x25 didn't start within 8 minutes, so I stopped time measuring.
Seems like the game engine is doing some heavy work...
Comment 2 Christoph Feck 2010-10-12 03:12:39 UTC
*** Bug 245756 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Feck 2011-08-05 19:49:52 UTC
*** Bug 278870 has been marked as a duplicate of this bug. ***
Comment 4 Frank Schaefer 2012-12-26 21:05:10 UTC
With KDE 4.9.4, this happens only noticable at difficulty level "unlimited".
I don't know if such a level really makes sense. If yes, there should be a status dialog with a "Cancel" button while creating the puzzle.
Comment 5 Ian Wadham 2012-12-27 05:43:22 UTC
The new puzzle generator introduced in KDE SC 4.8 does not have this problem, except as you have observed in Unlimited difficulty mode. It encounters "road blocks" unpredictably during the generation process, instead of churning out and checking candidate puzzles regularly.

There is already a limit of 20 attempts to generate a puzzle with the type, size, difficulty and symmetry as ordered, after which KSudoku picks the best attempt so far and the user has the option to go on trying. Unlimited mode is just not getting that far on large-size puzzles. This is not right, but I cannot decide if it is worth investigating.

The point of Unlimited mode is for possible savants out there who have no problem with how many guessing and backtracking points there may be nor how soon the guessing has to start. The levels up to and including Hard normally require no guessing. These and the Diabolical level, which usually does require guessing, have been tested and calibrated against published puzzles in newspapers etc. My wife, who regularly does Hard and Diabolical puzzles, found Unlimited puzzles "inhuman" (i.e. tedious, very difficult and no fun) and my own experience was the same. That is why I introduced limits on guessing in the other levels.
Comment 6 Christoph Feck 2013-09-23 21:39:05 UTC
*** Bug 325199 has been marked as a duplicate of this bug. ***
Comment 7 Gregor Mi 2018-05-15 22:29:33 UTC
https://phabricator.kde.org/D12908 extends the Unlimited message box to warn users that the generation of Unlimited puzzles might take long time.
Comment 8 Gregor Mi 2018-05-16 09:07:09 UTC
I lower the Importance from Crash to Grave.
Comment 9 Gregor Mi 2018-05-16 10:00:47 UTC
Suggestion for a sustainable solution:

Currently we have a Welcome Screen and a Game Screen. This could be extended by a Generate Puzzle Screen.

This new Generate Puzzle could contain:

- A progress bar to indicate puzzle generating work (would solve this ticket)

- The message "It will be possible to solve the generated puzzle by logic alone. No guessing will be required. The internal difficulty rating is 3.6. There are 31 clues at the start and 50 moves to go." instead of in a message box

- "Generate New" button (formerly the "Retry" button from the message box)

- Difficulty and Symmetry settings - This way those comboboxes could be removed from the status bar and replaced by simple labels as the comboboxes have no function in the Game Screen.

- The message "After 20 tries, the best difficulty level achieved is 2, with internal difficulty rating 2.8, but you requested difficulty level 4. Do you wish to try again or accept the puzzle as is?" instead of a complicated message box (see also https://bugs.kde.org/show_bug.cgi?id=357999)

- "Back to Game selection" button
Comment 10 Gregor Mi 2018-07-07 16:55:07 UTC
Git commit b6e059b12644fa70693d47801dcdfc515923aba7 by Gregor Mi.
Committed on 07/07/2018 at 16:54.
Pushed by gregormi into branch 'master'.

Improve two messages

Summary:
Related: bug 357999

1. Improve Low Difficulty warning message to solve Bug 357999 ("Missing word in Low Difficulty warning message")
2. Improve Bug 242300 ('"Generate A Puzzle" hangs when big games like 16x16 or 25x25 games are chosen"): Warns users that generation of Unlimited mode puzzles takes long time
3. Explain better what "Enable all messages" means

Reviewers: #kde_games, aacid

Reviewed By: aacid

Subscribers: mreeves, aacid, ngraham, kde-games-devel

Differential Revision: https://phabricator.kde.org/D12908

M  +7    -6    src/generator/sudokuboard.cpp
M  +7    -2    src/gui/ksudoku.cpp

https://commits.kde.org/ksudoku/b6e059b12644fa70693d47801dcdfc515923aba7