Unify the two solvers in Solo. nsolve has now had recursion
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 6 Jul 2005 18:36:20 +0000 (18:36 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 6 Jul 2005 18:36:20 +0000 (18:36 +0000)
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.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6077 cda61777-01e9-0310-a592-d414129be87e


No differences found