27.01.2014 Views

Multiagent Systems

Multiagent Systems

Multiagent Systems

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6. Propositional Logic 3. Sudoku<br />

More constructs in smodels<br />

1 1 { p(X,Y,A) : val(A) } 1<br />

:- row(X), col(Y)<br />

this makes sure that in all entries of the grid,<br />

exactly one number (val()) is contained.<br />

2 1 { p(X,Y,A) : row(X) : col(Y)<br />

: eq(div(X,3), div(R,3))<br />

: eq(div(Y,3), div(C,3) } 1<br />

:- val(A), row(R), col(C)<br />

this rule ensures that in each of the 9 squares<br />

each number from 1 to 9 occurs only once.<br />

3 More detailed info is on the web-page of this<br />

lecture.<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 446/731

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!