Information Technology Reference
In-Depth Information
The fifth query shows that there is a double-atom explanation for these three
facts. The explanation is that the car is out of gas and the radio speaker is broken
(in either order).
The sixth query looks for an arbitrary explanation under the same conditions. It
finds the double explanation, but then continues to search indefinitely until all
memory is exhausted.
The last query shows that it is possible to use explain without specifying how many
atomic sentences are desired, but some care is needed.
11.3 Learning
As noted at the start of this chapter, (inductive) learning is a form of thinking that is
similar to explanation except that instead of seeking an atomic sentence to account
for a query's being true, it looks for a general rule , that is, a conditional sentence with
variables to explain some observations. If it is known that Thornton and his friends
are polar bears, and they are all observed to be white, it is reasonable to induce that
all polar bears are white. Then on hearing of a new polar bear, one may wish to
conclude that she also is white.
The general format for this type of thinking is similar to the explain predicate.
Instead of
explain(Q,E) :- background(K), merge(E,K,K1), est(K1,Q).
which generates an explanation E (a list of atoms) that accounts for a given query Q ,
a predicate induce is defined as follows:
induce(Q,R) :- background(K), rule(R), est([R|K],Q).
The predicate rule generates a conditional sentence R with the property that if it is
added to the background knowledge K , then Q can be established. For example, if the
background knowledge contains polar_bear(thornton) and polar_bear(shako) ,
the desired behavior is the following:
?- induce([white(thornton),white(shako)],R).
R = [white(_G17), polar_bear(_G17)]
This induced rule (with the variable _G17 in it) says that polar bears are white. The
next section discusses how to generate rules like this.
 
 
Search WWH ::




Custom Search