mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Unify the two solvers in Solo. nsolve has now had recursion
capability added to it, to be used only when all else fails, and is simply called `solver'. This means that: - solving of 5x5 Trivial grids using the `Solve' function, which previously hung for ages because rsolve happened to take a wrong turning at the start, is now zippy - solosolver doesn't require the confusing -r and -n options - solosolver can show its working even for Unreasonable grids. Unfortunately, the new unified solver still isn't suitable for grid generation. After it proved to be so much faster at solving 5x5s, I hoped to be able to substitute it for rsolve during generation and gain additional speed in 5x5 generation too; but no luck, because it's slower _per recursion level_, and although during solving it makes up for this by needing very few levels, there is a lot of _unavoidable_ recursion during generation, especially at 5x5. A hybrid strategy which starts off with rsolve and switches to the unified solver at a critical point proved unsatisfactory as well, because the critical point changes depending on the vagaries of the recursion and can't be pinpointed easily. So rsolve is still in there, only renamed `gridgen' because that's now all it's good for. [originally from svn r6077]
This commit is contained in: