17

I need to do a project for class in Prolog but they gave us no guidance at all in the language it self. I was reading http://kti.mff.cuni.cz/~bartak/prolog/contents.html but I am not understanding anything of what I am reading.

Any better sources out there you can share?

user1319603
  • 765
  • 1
  • 9
  • 13
  • All I can say is that I know from experience that there aren't any good beginners books' – keyser May 01 '12 at 22:21
  • 3
    http://stackoverflow.com/questions/401635/good-beginners-material-on-prolog – m09 May 01 '12 at 22:54
  • 2
    @keyser5053: I disagree, I find Learn Prolog Now! to be good beginners material, for example. – m09 May 01 '12 at 22:55
  • 1
    I second the http://www.learnprolognow.org/ website... :) –  May 03 '12 at 03:12
  • 1
    While I understand reasons why this questions is closed, I think that reopening it and finding it a nice answer would be ok solution. It is really hard to get basic knowledge of the language on one's own. – FanaticD Apr 13 '15 at 21:48
  • https://hackr.io/tutorials/learn-prolog is a great place to find the best prolog tutorials recommended by the programming community. – Saurabh Hooda Jul 03 '17 at 11:30

3 Answers3

11

Bratko's "Prolog Programming for AI" is excellent, clear, lively, accessible. Sterling and Shapiro's "The Art of Prolog" is very good too, very thorough with the basic/foundational stuff.

Bratko was the one were it "clicked" for me. I took this slogan from him (don't remember if he wrote it or if I distilled it from his book somehow) - in Prolog, to understand the question is to have your answer. Writing down the question properly gives you a runnable program, more or less. I remember reading a page on AVL trees where he wrote down the definition, and I turned the page expecting to see the "solution". But it was already about something else. Turning the page back I realized, that the statement of what AVL trees were, was already the program itself.

Will Ness
  • 70,110
  • 9
  • 98
  • 181
9

Many moons ago, I liked the book Programming in Prolog by William F. Clocksin & Christopher S. Mellish. It also helps to work through exercises and see how the language works. You can work through some problems from this site Werner Hett's P-99: Ninety-Nine Prolog Problems and here SWI Prolog is a good implementation to use.

Roman
  • 1,179
  • 6
  • 7
4

I like Adventures in Prolog, but learning a logic language on your own can be very hard. You really can learn much faster and more correctly with a mentor or taking a college course.

Guy Coder
  • 24,501
  • 8
  • 71
  • 136
  • 2
    Any language **must** be learnt **using** it. And IMHO Prolog more than others, because it's more 'thick' than others... – CapelliC May 02 '12 at 08:33