foundations of computational agents
The third edition of Artificial Intelligence: foundations of computational agents, Cambridge University Press, 2023 is now available (including full text).
To implement the how question of Section 5.4.3, the interpreter can build a proof tree for a derived answer. Figure 14.13 gives a meta-interpreter that implements built-in predicates and builds a representation of a proof tree. This proof tree can be traversed to implement how questions. In this algorithm, a proof tree is either , , of the form where is an atom and is a proof tree, or of the form where and are proof trees.
% is true if base-level body is a logical consequence of the base-level knowledge base, and is a representation of the proof tree for the corresponding proof.
Consider the base-level clauses for the wiring domain and the base-level query . There is one answer, namely . The meta-level query returns the answer and the tree Although this tree can be understood if properly formatted, it requires a skilled user to understand it. The how questions of Section 5.4.3 traverse this tree. The user only has to see clauses, not this tree. See Exercise 13.