Author | Message |
---|---|
rabbott
Posts: 1649
|
Posted 15:22 Oct 30, 2019 |
After class today Juan Placentia showed me a Sudoku solver he wrote. (Congratulations to Juan for taking the initiative to write it!) That made me curious about other Sudoku models. This model is a modification of a solver from the MiniZinc library. The modification involves replacing quantifications with MiniZinc's version of slices. The things to notice are the slices in the constraints. For example, here is the
constraint
forall(i in 1..N)(alldifferent( puzzle[i,1..N] ));
The same thing is done for the It's also done in a somewhat more complex way for the
The variables i and j range from 1 to 3. That means that Last edited by rabbott at
15:39 Oct 30, 2019.
|