On Tue, Apr 03, 2007 at 11:26:58PM +0100, Ben Hutchings wrote: > Josh, thank you for testing corner cases in the puzzles. > > James, I hope I'm using the right address for forwarding this bug, even > though it's nothing to do with the Palm port.
In this case I'm interested since I wrote this particular puzzle implementation; generally, though, Simon Tatham's probably the first point of call (who I've cc'd) -- it's his puzzle collection, and he'd be able to contact individual puzzle authors when required. > On Mon, 2007-04-02 at 23:18 -0700, Josh Triplett wrote: > > Package: sgt-puzzles > > Version: 7407-1 > > Severity: important > > File: /usr/games/bridges > > > > Bridges gets stuck in a loop if asked to generate a custom puzzle with width > > and height 3x3, and all other settings at the default. > > This happens because generated graphs must extend to the edge of the > grid and must have the specified proportion of islands (rounded down and > clamped to a minimum of 2). On a 3x3 grid these conflict since they > require at least 3 and exactly 2 islands respectively. > > The minimum number of islands should be changed to 3 for Easy puzzles > and to 4 for Medium and Hard puzzles since 3-node graphs are always > rated Easy. Alternately the grid-filling and difficulty requirements > could be relaxed where they conflict with the required number of > islands. > > James, what do you think is the proper solution? Yes, I think your solution is correct. Having the minimum #islands as 2 is definitely wrong because the 'one island at each edge' can never be satisfied in that case (without a degerate 1xX grid, which is disallowed). A quick test with a minimum of 4 islands allows me to generate either a 3x3 Easy or a 3x3 Hard, but not a 3x3 Medium. I think that actually the generation code needs to be made to give up more easily in degenerate cases (possibly returning a puzzle that's not quite as hard as requested); other puzzles do this already. I'll try to take a proper look at this over the next few days, and get a patch to Simon soon; presumably the Debian unstable package will pick the new version up soon? I can send the patch back to this bug as well, if it'd help. Cheers, -James -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]