ref: c8a843ee62e2a4a984a39aecd65865d7e9ab189d
parent: 771532fe7f649132c2b82e2ab12f2c079e242430
author: Simon Tatham <anakin@pobox.com>
date: Tue Apr 8 05:36:33 EDT 2008
Improvements to filled-grid generation. Introduced a cunning idea suggested by IWJ last night: grid generation can immediately choose an entire grid row randomly, since all that's doing is nailing down the names of the numbers, and that gets the whole thing started more efficiently. But the main difference is that now grid generation is given only area^2 steps to come up with a filled grid, and then cut off unceremoniously, causing grid generation to fail and be retried from scratch. This seems to prevent hangups on jigsaw layouts that admit few useful solutions, by changing layout constantly. 9j puzzles now generate at a sensible rate, and as an added bonus so do 5x5 normal puzzles, which they never used to. [originally from svn r7978]