sciolizer / exact_cover Goto Github PK
View Code? Open in Web Editor NEWAlgorithm X
Algorithm X
Good to come across this library, which looks well-implements.
Trying it out on your sample grid
g1 =
["003020600",
"900305001",
"001806400",
"008102900",
"700000008",
"006708200",
"002609500",
"800203009",
"005010300"]
sampleGrid :: Grid
sampleGrid = zipWith3 (\r c v -> Move (r, c) v) rows cols vals
where
rows, cols, vals :: [Int]
rows = [ n | n <- [0..8], _ <- [0..8]]
cols = [ m | _ <- [0..8], m <- [0..8]]
vals = map digitToInt (concat g1)
result = solveSudoku sampleGrid
triggers the "invalid state" error. Is this an issue with the constraint / satisfier specification, or with solve, do you think?
Hi,
Searching for an Algorithm X implementation in Haskell, I came across your repository. Would you be willing to provide an example or give me a hint as to how to implement your code when each set is presented as a list of a list of ints ( i.e., each set is type [[Int]] )? One subset of each set needs to be chosen where in the final result none of these subsets share any elements (their intersections are null).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.