I am making a 3x3 Sudoku solver with Drools planner. The planning entities
are the digits. The problem facts are the rows (planning variable) and
columns.
When I set Drools Planner to solve a problem where no digit is initialized,
it gives a perfect solution in ~15 secs. But when I set a few digits as
initialized, it never finds a solution. It always lists 8 hard constraints
broken on termination.
I implemented the moves as:
if(digit.getFixed()==false){
moveList.add(new RowChangeMove(digit, toRow));
}
If the digit is fixed, dont make a move object for it.
Earlier, I implemented it in isMoveDoable: if the digit.getFixed() is true,
it returns false. Both do not work.
20:31:13.442 [main] INFO o.d.p.c.l.DefaultLocalSearchSolverPhase - Phase
local search finished: step total (978), time spend (60061), best score
(-8).
20:31:13.442 [main] INFO o.d.p.core.solver.DefaultSolver - Solved: time
spend (60061), best score (-8), average calculate count per second (7433).
--
View this message in context:
http://drools.46999.n3.nabble.com/Why-is-solving-a-partial-puzzle-much-sl...
Sent from the Drools: User forum mailing list archive at
Nabble.com.