array fieldBounds ) ( mapM ( uncurry ( fmap. Node sudoku ( chooseMinLen ( map ( map treeAltToStandardOptimize ) subs )) maybeComplete :: T -> Maybe Complete maybeComplete sudoku = fmap ( Array. treeAltToStandardOptimize :: ATree T -> Tree T treeAltToStandardOptimize ( ANode sudoku subs ) = let chooseMinLen = chooseMinLen xs = minimumBy compareLength xs in Tree. This does a backtracking search, trying possibilities until it finds one which works, and backtracking when it can no longer make a legal move. It possibly looks even more naïve than it actually is. Note: Most subscribers have some, but not all, of the puzzles that correspond to the following set of solutions for their local newspaper.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |