
Prolog programming for artificial intelligence
by Ivan Bratko, Bratko, Ivan. · first published 1986
17mentions
10recommended by
12HN commenters
2009–2026first – last mentioned
83% recommend17% neutral
Why HN recommends it
Clear, well-paced introduction to Prolog that patiently explains its unusual concepts and uses AI-flavoured projects instead of tedious family-database examples; recommended for beginners from mainstream languages.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.







I've also heard only good things about the Bratko book, Prolog Programming for Artificial Intelligence. I'm curious as to what put you off about TRS? The only thing I found initially frustrating was the lack of hand-holding to be found in the earlier books in the Schemer series. But then I starting working…
on “99 Prolog Problems” ↗…and the synthesis used in Barliman--I suspect Barliman's example-based synthesis could get a real boost from ILP. One book I highly recommend, and which I've found very accessible, is Ivan Bratko's 'Prolog Programming for Artificial Intelligence'. The 4th edition has a section on ILP. If you are interested in ILP and also in Barliman, maybe this is a topic we could explore together.
on “Barliman: Prototype of a smart text editor” ↗I found Ivan Bratko's Prolog Programming for Artificial Intelligence excellent (I've read the previous two editions, but not the current 4th).
on “The Birth of Prolog (1992) [pdf]” ↗…is vastly different from other programming systems and some of the concepts take a bit of exposition before they sink in, and this book very much strives to explain quite a lot of mysterious things. Prolog Programming for Artificial Intelligence by Ivan Bratko.
on “Logica, a novel open-source logic programming language” ↗Perhaps a little bit specific, but definitely worth the read: "Prolog Programming for Artificial Intelligence" by Ivan Bratko (0321417461)
on “A Short Introduction to Prolog” ↗Prolog Programming for Artificial Intelligence. Prolog is almost like magic the first time one is exposed to it.
on “Ask HN: Do you recall any book or course that made a topic finally click?” ↗Which textbook was that? I think that Bratko ("Prolog programming for Artificial Intelligence) is probably the most friendly to beginning programmers with a background in more mainstream languages.
on “Use Prolog to improve LLM's reasoning” ↗Prolog Programming for Artificial Intelligence" by Ivan Bratko, is a reasonable text book on Prolog.
on “Stop Designing Languages. Write Libraries Instead (2016)” ↗I loved Prolog Programming for Artificial Intelligence by Ivan Bratko.
on “Ask HN: Good books to learn Prolog?” ↗I'll add my default recommendation that I provide in every intro to Prolog thread: The best book to learn is "Prolog Programming for Artificial Intelligence". The intro part is great and the AI parts are also excellent. I think "Art of Prolog" and "Craft of Prolog" should be next in that order. I fully support the choice of SWI-Prolog by the author of the…
on “A gentle introduction to Prolog (2013)” ↗…in "modern languages" anymore. (Intro/Novice) Learn Prolog Now (free on the web) Adventure in Prolog(free on the web) Logic Programming with Prolog (Intermediate) The Practice of Prolog Prolog Programming for Artificial Intelligence Prolog Programming In Depth Prolog Experiments in Discrete Mathematics, Logic, and Computability (Advanced) The Art of Prolog The Craft of Prolog Clause and Effect Simply Logical Prolog…
on “The Birth of Prolog (1992) [pdf]” ↗…head when I got it (maybe I'm not that smart) and the typical "family database" examples are kind of tedious. I've worked through a couple of books now and the first book I'd recommend these days is "Prolog Programming for Artificial Intelligence". Don't let the AI in the title distract you, Part 1 is a very good introduction to Prolog (the best I'm aware of) and Part 2 covers typical AI topics (also very interesting of course).
on “TuProlog: Making Prolog Ubiquitous” ↗I agree on the Prolog recommendations. My suggested path would be: (1) Prolog Programming for Artificial Intelligence (first half is sufficient to start) -> (2) The Art of Prolog -> (3) The Craft of Prolog As a first "get to know the language" I'd add: http://www.amzi.com/AdventureInProlog/a1start.php You build a…
on “Functional programming books review” ↗…usually not very fast. However I'm not a very proficient Prolog programmer so it could very well be on me for not optimizing enough. If you want some book recommendations I think the best first book is "Prolog Programming for Artificial Intelligence" (best intro section which is the first half of the book so highly recommended even if you don't care about AI at all). The classics are great followups to that (Art of Prolog first, Craft of Prolog second).
on “Writing custom type systems for Python in Prolog” ↗There's very little that's modern and most modern resources teach you bad habits and non-idiomatic code. For good habits and a good introduction: https://www.metalevel.at/prolog I like "Prolog Programming for Artificial Intelligence" as a great print book with interesting projects that is fairly modern but be warned that much of the code is not idiomatic, so please refer to the first resource if you are looking to write too quality…
on “Game Programming in Prolog” ↗