Display program code

sudoku_simple.pl : Simple Sudoku Solver
Very naive sudoku solver in just two rules. Use one of the more advanced solvers if you actually want to solve real sudoku puzzles. This one is for toy examples.

How to use:
Board positions are encoded as Row-Col, e.g. the top-left corner is 1-1 and the top-right corner is 1-9. First give all given cell values as given(Row-Col,Value). Then give all unknown cells as maybe(Row-Col,[1,2,3,4,5,6,7,8,9]). (or another second argument if you want to solve smaller or larger sudoku puzzles) Look at the example queries for some useful auxiliary predicates.
The predicate sees/2 is used to compare two sudoku positions; it should succeed if two positions cannot share the same value and it should fail otherwise.

See also:
See also: sudoku.pl

Program: Change the code, then submit!

Console: Enter query or select example from below, then submit and wait for answer!

Select example query: 

WebCHR help - CHR Website - (c) Copyrights Martin Kaeser Uni Ulm 2007