Sergii’s post inspired me to do the same for answer setprogramming, with clasp/gringo. I’ve uploaded the code to github.
Brief notes on ASP (& Sudoku)
I am just getting started with answer set prolog. Here are some first impressions:
Syntactically, it is very similar to Good Old Fashioned Prolog, with one or two additions. For example:
There’s a lot of sugar enabling concise code. e.g.,
A predicate without a head is known as a constraint. The sense is that the specified conjunction is not true.
:- paint(R, C1, N), paint(R, C2, N), C1 != C2.
In the sudoku code, paint/3 is a fact signifying that a cell at Row and…
View original post 540 more words