solve str8ts with prolog (puzzle like sudoku)

Skip to first unread message


Feb 16, 2015, 3:13:54 PM2/16/15
Hi, i want to solve str8ts with prolog.

problem is: first i set the constraints for all rows(fiels which are black and undefined are excluded first)

                 constraint 1: all_different(rowN)
                 constraint 2: rows ins 1..9

now i split every row into lists of white boxes --> and check if the group is gapless. if there is a variable undefined -> the variable is filled.

there is the problem. i only want so set the constraint, that the group has to be gapless... 

after i set the constraints for all rows and columns, i want to use labeling from clpfd libary. 

but i dont know how to set the constraint, that a group is gapless without set variables for the row/column.

I added my .pl 

this is a example puzzle:  

any one can give me a tip?
Reply all
Reply to author
0 new messages