simon-svn: puzzles: simon
Commits to Tartarus CVS repository.
tartarus-commits at lists.tartarus.org
Fri Apr 12 17:28:55 BST 2013
SVN root: svn://svn.tartarus.org/sgt
Changes by: simon
Revision: 9828
Date: 2013-04-12 17:28:55 +0100 (Fri, 12 Apr 2013)
Log message (13 lines):
Patch from Rogier Goossens to speed up the Pattern solver.
do_recurse() now prunes early whenever it encounters a branch of the
search tree inconsistent with existing grid data (rather than the
previous naive approach of proceeding to enumerate all possibilities
anyway and then ruling them out one by one); do_recurse also tries to
split the row up into independent sections where possible; finally the
main solver loop (all three copies of which have now been factored out
into a new solve_puzzle function), instead of simply looping round and
round over all the rows and columns, heuristically looks at the ones
most changed since the last time deduction was attempted on them, on
the basis that that will probably yield the most information the
fastest.
Modified files:
U puzzles/LICENCE
U puzzles/pattern.c
U puzzles/puzzles.but
Links:
http://svn.tartarus.org/sgt/?rev=9828&view=rev
http://svn.tartarus.org/sgt/puzzles/LICENCE?rev=9828&r1=9827&r2=9828
http://svn.tartarus.org/sgt/puzzles/pattern.c?rev=9828&r1=9827&r2=9828
http://svn.tartarus.org/sgt/puzzles/puzzles.but?rev=9828&r1=9827&r2=9828
More information about the tartarus-commits
mailing list