My teacher has asked us to learn SWI-Prolog for AI. I am new to SWI-Prolog. I cannot find out how do I get started. I have installed SWI-Prolog. But where should I write the database. How do I save the database. How do I load the database with the terminal and how am I supposed to aske queries. If you guys could point me to the right direction then it would ve really kind of you. Thanks in advance. It might not be a proper programming question, But I couldn't figure it out where to ask?
Asked
Active
Viewed 1,434 times
0
-
2You could start here: http://www.swi-prolog.org/pldoc/man?section=overview – lurker Mar 29 '14 at 21:47
-
1Thanks a lot. I have compiled a file and now I am running it. – odbhut.shei.chhele Mar 29 '14 at 21:55
-
That's great! Keep reading, exploring, and have fun. :) – lurker Mar 29 '14 at 21:56
1 Answers
1
The SWI-Prolog site holds a wealth of knowledge, but it is not intended to teach you the beginnings of Prolog programming. For that purpose a good introduction that is both free and available online is:
For slightly more advanced stuff (grammars, Web programming, modules) you can have a look at the awesome tutorials by Anne Ogborn:
Since Prolog is such a different programming paradigm, I would recommend you also have a look at some books. To my option the following two books provide the best introduction:
- Shapiro, The Art of Prolog: Advanced Programming Techniques
- Bratko, Prolog Programming for Artificial Intelligence
Notice that the Bratko book targets AI specifically.

Wouter Beek
- 3,307
- 16
- 29