mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 23:51:29 -07:00
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. [originally from svn r9828]
This commit is contained in:
2
LICENCE
2
LICENCE
@ -2,7 +2,7 @@ This software is copyright (c) 2004-2012 Simon Tatham.
|
||||
|
||||
Portions copyright Richard Boulton, James Harvey, Mike Pinna, Jonas
|
||||
K<EFBFBD>lker, Dariusz Olszewski, Michael Schierl, Lambros Lambrou, Bernd
|
||||
Schmidt, Steffen Bauer and Lennard Sprong.
|
||||
Schmidt, Steffen Bauer, Lennard Sprong and Rogier Goossens.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation files
|
||||
|
Reference in New Issue
Block a user