Question

I'm trying to solve any Sudoku puzzle using production rules, with Drools as my inference engine. One of the examples packed with Drools is precisely a Sudoku solver, here are the relevant rules:

http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/sudoku/sudokuSolver.drl

... But it doesn't work right. All of the time, one or more cells in the grid end up empty and the program reports the puzzle as "unsolved".

Has anybody built a working inference rule-based solver for Sudoku? it doesn't matter the language or engine used, I would like to see the set of rules so that I can adapt them for Drools

Was it helpful?

Solution

OTHER TIPS

Don't use trunk (master on github now), as that's unstable. Use the latest release from the download page. Apparently this example's been broken already in the 5.1 release, so you'd need the 5.0 release... Here's the issue, it might be solved for 5.2.0.M1 which will be released any day now, otherwise later.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top