This sudoku solver is my attempt at a clean architecture. I want to make sure to do the home work properly before coding. Basically once this solver is implemented, it should be idiomatic of solutions to a lot of other problems.
the sudoku solver should apply solver algorithms from a set until a test case is solved.
pseudo code:
A B C
mysudosol::( Set of algos) -> (Set of puzzles)->( Set of solved puzzles)
A can be a container of actions each of which takes a puzzle state , transforms it some how and returns the transformed version.
B can be a container of puzzles, even a list would do.
C same as B
as for the algos, personally i dont like having to implement an algo in one place, and then register it or add it to the set A explicity. it would be great if that could be discovered as opposed to having to register. eg: i implement mysooperdoopersolveralgo as an action that can be part of the set A, and put it in a certain place, and it autimatically gets included in A. now this wouldn't be that much to think about, if i wanted to put all the implementations in A directly, but i want them else where, and i suspect in the future i will get third party solvers too. in that case, i want to just put their solver in a place, and not have to recompile my sources. but i don't know yet how that works with Haskell
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment