5.3 Propositional Definite Clauses

The third edition of Artificial Intelligence: foundations of computational agents, Cambridge University Press, 2023 is now available (including full text).

5.3.1 Questions and Answers

One reason to build a description of a real or imaginary world is to be able to determine what else must be true in that world. After the computer is given a knowledge base about a particular domain, a user might like to ask the computer questions about that domain. The computer can answer whether or not a proposition is a logical consequence of the knowledge base. If the user knows the meaning of the atoms, the user can interpret the answer in terms of the domain.

A query is a way of asking whether a proposition is a logical consequence of a knowledge base. Once the system has been provided with a knowledge base, a query is used to ask whether a formula is a logical consequence of the knowledge base. Queries have the form

𝖺𝗌𝗄 b.

where b is a an atom or a conjunction of atoms (analogous to the body of a rule).

A query is a question that has the answeryes” if the body is a logical consequence of the knowledge base, or the answer “no” if the body is not a consequence of the knowledge base. The latter does not mean that body is false in the intended interpretation but rather that it is impossible to determine whether it is true or false based on the knowledge provided.

Example 5.8.

Once the computer has been told the knowledge base of Example 5.7, it can answer queries such as

𝘢𝘴𝘬 light_l1.

for which the answer is yes. The query

𝘢𝘴𝘬 light_l6.

has answer no. The computer does not have enough information to know whether or not l6 is a light. The query

𝘢𝘴𝘬 lit_l2.

has answer yes. This atom is true in all models.

The user can interpret this answer with respect to the intended interpretation.