[funds-cvs] r177 - trunk/funds/src/examples

abaine at common-lisp.net abaine at common-lisp.net
Mon Aug 20 01:04:26 UTC 2007


Author: abaine
Date: Sun Aug 19 21:04:25 2007
New Revision: 177

Modified:
   trunk/funds/src/examples/sudoku.lisp
Log:
Removed stupid 'optimization' from solver.

Modified: trunk/funds/src/examples/sudoku.lisp
==============================================================================
--- trunk/funds/src/examples/sudoku.lisp	(original)
+++ trunk/funds/src/examples/sudoku.lisp	Sun Aug 19 21:04:25 2007
@@ -135,8 +135,6 @@
 	  (iter (for f in x-y-z-functions)
 		(for (values x y n) = (best-group puzzle f))
 		(finding (list f x y) minimizing n into (best-list min))
-		(when (= min 1)
-		  (return (apply #'solve-group puzzle best-list)))
 		(finally (return (apply #'solve-group puzzle best-list)))))
       nil))
 
@@ -147,13 +145,9 @@
 	       (iter (for y below size)
 		     (for n = (group-freedom puzzle x-y-z-function x y))
 		     (finding y minimizing n into (best-y min))
-		     (when (= min 1)
-		       (return (values best-y min)))
 		     (finally (return (values best-y min)))))
 	  (finding x minimizing n into best-x)
 	  (finding y minimizing n into (best-y best-n))
-	  (when (= best-n 1)
-	    (return (values best-x best-y best-n)))
 	  (finally (return (values best-x best-y best-n))))))
 
 (defun group-freedom (puzzle x-y-z-function x y)



More information about the Funds-cvs mailing list