Pearl freezes on many custom game types

Bug #1299845 reported by David McKenney-Barschall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sgt-puzzles (Ubuntu)
New
Undecided
Unassigned

Bug Description

I started up Pearl, and decided I wanted a longer game, so I clicked Type -> Custom..., and set it to 20x20 tricky.

The game froze, occupying one of my computer's CPUs, until I killed it a minute later.

I tried again with 16x16, 12x12, and 5x5 (all tricky), and all froze.

Sizes *between* the existing sizes seem to work, and Tricky seems to work up to 11x11, while Easy works up to 14x13. Easy works down to 5x5, and and Tricky works down to 6x5

I'm not sure if this is actually the game not working at all, or if it's just that the difficulty of generating these puzzles increases really quickly, but it would be nice if I could at least close the program normally while this is happening.

(I'm running Ubuntu 12.04 x64 Desktop)

Revision history for this message
Ben Hutchings (benh-debian) wrote :

Most of the puzzle types include a solver which is used to assess the difficulty level of a randomly generated puzzle (can it be solved using simple deductions? is more complex reasoning required? is there actually a single solution?). They will repeatedly generate random puzzles and attempt to solve them, until they find one of the wanted difficulty level.

For small sizes, it may be that there are no possible puzzles at the higher difficulty levels, so this will run forever. This is arguably a bug, and at least one instance of this bug (in Bridges, I think) has been fixed by falling back to a lower difficulty level.

Some solvers can require time proportional to the square or higher power of the number of spaces in the puzzle, or even exponential to the number of spaces in the puzzle. For large sizes, they will not run forever but may take an unreasonably long time.

I agree that there ought to be a way to cancel puzzle generation, which would deal with both problems. However this may be quite difficult to do as it would require changes to each individual puzzle (check for cancellation).

By the way, Pearl settings of 12x12 tricky work for me, usually taking under 10 seconds.

Revision history for this message
David McKenney-Barschall (david-mckenney-barschall) wrote :

Exactly how big you can go before things get slow probably depends on your computer.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.