[gecode-users] [Help] Killer sudoku model (newbie)
Jean-Christophe Godart
jc at freesoft.be
Wed Mar 22 13:51:41 CET 2006
Le 22-mars-06, à 11:46, Mikael 'Zayenz' Lagerkvist a écrit :
> PS. For larger examples, you might not want to use linear() with
> ICL_DOM, since it has exponential complexity.
Thanks for your quick answer :-)
That was actually the problem. Using ICL_DOM won't find the solution
whereas all other icl do.
Now, I'll make some tests with largers 3x3 grids.
OK I know I should RTFM, but...
Any hint on which default options to use for such a problem ?
Also for BVAR & BVAL params to search()
Then for the constrains which are now simply distinct() and linear()
Would it help to define the sum as post( a + b + c ... == s) instead of
linear() ?
When solving a Killer Sudoku by hand and logic, almost every time, we
go through a state where the values that make up a cage are known, but
their actual location isn't known yet.
For instance, something like the domain of 2 vars A & B is restricted
to a pair of values and consequently no other var that is constrained
by a distinct() both for A & B may not containt these values and we can
then restrict their domain to exclude this pair of value.
In the Sudoku terminology, that's what is called naked pair, triplet or
more generaly naked subset.
Now, is there a better approach in the modeling of killer sudoku
constraints, knowing that it's a very common case ?
Would it help using IntSet ?
Sorry if it's not clear, I'm a CSP newbie :-S
Kind regards,
--
Jean-Christophe Godart, Belgium. http://sudoku.apinc.org/
More information about the gecode-users
mailing list