foundations of computational agents
The third edition of Artificial Intelligence: foundations of computational agents, Cambridge University Press, 2023 is now available (including full text).
One of the most useful abilities of a meta-interpreter is to delay goals. Some goals, rather than being proved, can be collected in a list. At the end of the proof, the system derives the implication that, if the delayed goals were all true, the computed answer would be true.
Providing a facility for collecting goals that should be delayed is useful for a number of reasons:
to implement proof by contradiction as used in consistency-based diagnosis or to implement abduction, the assumables are delayed
to delay subgoals with variables, in the hope that subsequent calls will ground the variables, and
to create new rules that leave out intermediate steps – for example, if the delayed goals are to be asked of a user or queried from a database.
% is true if is an ending of and logically follows from the conjunction of the delayable atoms in .
Figure 14.14 gives a meta-interpreter that provides delaying. A base-level atom can be made delayable using the meta-level fact . The delayable atoms can be collected into a list without being proved.
If you can prove , you know that the implication is a logical consequence of the clauses, and is true for all . This idea of deriving a new clause from a knowledge base is an instance of partial evaluation. It is the basis for explanation-based learning which treats the derived clauses as learned clauses that can replace the original clauses.
As an example of delaying for consistency-based diagnosis, consider the base-level knowledge base of Figure 14.10, but without the rules for . Suppose, instead, that is delayable. This is represented as the meta-level fact
The query
has one answer, namely, . If were true, then would be true.
The query
has the answer . If and are , then will be lit and will be live.
Note that appears as an element of this list twice. does not check for multiple instances of delayables in the list. A less naive version of would not add duplicate delayables. See Exercise 9.