[rules-users] Sudoku example doesn't work in drools 5.1

Gabor Szokoli szocske at gmail.com
Wed Jan 19 04:03:06 EST 2011


Hi,

On Wed, Jan 19, 2011 at 8:35 AM, Mark Proctor <mproctor at codehaus.org> wrote:
>
> Any takers for a more robust sudoku example, that demonstrates best
> practice?

I'm considering volunteering as a learning exercise. Won't be perfect
at first, but you can drill me on those best practices for free :-)

However I don't understand how backtracking is done for speculative
facts inserted by rule #11.

Also I only see the need for 4 distinct salience levels: housekeeping,
single elimination, double elimination, branching.

Using "aggregate count" I could get rid of ResolvedCellValue
altogether, then salience becomes an optimization, not a part of the
logic influencing the outcome.

Is there such a thing as "removeLogical", or should we invert the
whole logic (accumulate EliminatedCellValues instead of removing
Possibles) to make use of insertLogical for a more interactive
experience?


BTW Sudoku is such a textbook case for Constraint Logic Programming,
the example documentation could mention the possibility of using
something other than Drools if the domain problem resembles this one
too much :-)


Gabor



More information about the rules-users mailing list