← Back to context

Comment by somat

2 days ago

Speaking of prolog, any recommendations for resources learning it at a stage somewhere between "draw three circles" and "draw the rest of the owl"

I don't have real work I need prolog for, but I find it an interesting subject, My personal learning goal, the point where I can say I know prolog reasonably well is when I can get it to solve this mit puzzle I found, a sort of variant of soduku. I found a clever prolog solver for soduku that I thought could teach me more in this domain, but it was almost to clever, super optimized for soduku(it exploited geometric features to build it's relationships) and I was still left with no idea on how to build the more generic relationships I need for my puzzle(specific example if soduku cells were not in a grid how could they be specified?), in fact I can find very little information on how to specify moderately complex, ad hoc relationships. One that particularly flummoxed me was that some rules(but you don't know which) are wrong.

https://www.swi-prolog.org/pldoc/man?section=clpfd-sudoku

The only decent Prolog book out there, IMNSHO, is "Clause and Effect" by Clocksin. Maybe some of the later chapters might help?

All the other books that I looked at were pretty awful, including the usual recommendations.

I got recommended and have in my bookshelf "The art of prolog" waiting for the year when I have time (or need) for it.

Prolog Programming for Artificial Intelligence" by Ivan Bratko, is a reasonable text book on Prolog.

Sudoku*. Suu means numbers in Japanese and Doku means solving here. So literally "number solving".

I would go with the reference, "The Art of Prolog".

If you want to learn LP concepts in general, Tarski's World is a great resource as well.