
guide to Prolog and Artificial Intelligence has been updated to include key developments in the field while retaining its lucid approach to these topics. New and extended topics include Constraint Logic Programming, abductive reasoning and partial order planning. Divided into two parts, the first part of the book introduces the programming language Prolog, while the second part teaches Artificial Intelligence using Prolog as a tool for the implementation of AI techniques. This textbook is meant to teach Prolog as a practical programming tool and so it concentrates on the art of using the basic mechanisms of Prolog to solve interesting problems. The fourth edition has been fully revised and extended to provide an even greater range of applications, making it a self-contained guide to Prolog, AI or AI Programming for students and professional programmers.
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 stuff.
Prolog is almost like magic the first time one is exposed to it.
Prolog Programming for Artificial Intelligence by Ivan Bratko.