
This book is aimed at the programmer who wishes to learn the advantages of programming in Prolog. It takes a pragmatic rather than theoretical approach to the language, using a full programming example rather than code fragments. The various features of Prolog, such as logic definitions, symbolic reasoning, database manipulation, natural language, I/O, and flow of control, are taught through the step-by-step development of an adventure game - an excellent and fun vehicle for showing Prolog's power. Through the exercises the reader applies the skill learned to the development of three other applications: an intelligent genealogical database, an expert system, and a business application. The unusual run-time behavior and variable binding of Prolog - the sources of its power - are fully explained through diagrams and traces so they can be effectively used by the programmer. It is recommended (but not required) that the reader use a Prolog interpreter to experiment with the language and application described in the book.
It's a lot of fun to work through, other prolog resources can be a little dry
https://github.com/klaussinani/awesome-prolog#resources
I recall going through the Adventure in Prolog one (free online resource) a while ago and enjoying it, helped direct a lot of exploration into the Prolog language and its capabilities for me. I have Clocksin & Mellish's Programming in Prolog (2003, 5th ed.) and liked it as a good introduction (or more expansion, I had dabbled in it previously and "knew" the language but not the full depth of it). I've read good things about The Art of Prolog by Sterling and Shapiro, but have not read it.
Novice: Adventure in Prolog Learn Prolog Now Logic Programming with Prolog
Med - Advanced: Clause and Effect The Art of Prolog The Craft of Prolog Wam Book The Practice of Prolog Prolog Programming for AI - Brakto
Deep Dive: Expert Systems in Prolog Natural Language Processing for Prolog Programmers Intelligent Image Processing in Prolog Representing Knowledge In Prolog
There are hundreds of books! The real gems are to be found in papers, look into published papers, you will find amazing topics on Meta Programming, Machine Learning, Compiler Construction, DCG, etc. Don't discount books by age, even if they were published in the 80s! The best books are from the 80's-90's.
A few sites https://www.metalevel.at/ https://www.cpp.edu/~jrfisher/www/prolog_tutorial/contents.h...
Use SWI-Prolog - https://www.swi-prolog.org/
https://www.cs.fsu.edu/~cap5605/Luger_0136070477_1.pdf
This is an excellent resource also for LISP (and Java!) and AI algorithms, particularly various search strategies.
I'd also recommend the standard Prolog textbtook, Prolog Programming for AI, by Ivan Bratko. You can most likely find an edition in most university libraries.
I've learned a lot from Adventure in Prolog, a Prolog tutorial on the Amzi! Prolog website (though I used a different Prolog to do the exercises, which is a very good sign of nice, basic and portable examples):
http://www.amzi.com/AdventureInProlog/advtop.php
Those are practical resources. On a more theoretical side, another commenter recommended Perreira & Shreiber, which I can't recommend enough. Also, for a more formal text on logic programming, with proofs and all, the classic reference is J. W. Lloyd, Foundations of Logic Programming. Again, you can probably find a copy in your friendly neighbourhood university library (or, er, google it for a very bad copy of dubious legitimacy, like).