Information Technology Reference
In-Depth Information
11.3.1
Inducing general rules
In the simplest case, a rule that explains some observations should have the following
characteristics:
The head of the rule should be a predicate in the relevant domain (like polar_bear
or white ) with variables as arguments.
The body of the rule should be a sequence of literals. Each literal should be a
possibly negated predicate in the domain. Moreover, the predicate should be
different from the one in the head (to avoid recursion), and the arguments of the
predicate should be among the variables in the head.
So for a rule whose head is r(X,Y,Z) , the body can contain the literals not(p(Y)) and
q(X,Z,X) but it should not contain r(X,Z,X) , which would make the rule recursive,
nor q(X,a,W) , which uses arguments a and W that do not appear in the head.
The simplest way to satisfy these requirements is to assume that each problem
domain specifies which predicates and which variables can be used. To do this, a
special predicate called predicate can be used. It plays a role similar to that of the
assumable predicate:
predicate(polar_bear(X),polar_bear,[X]).
predicate(white(X),white,[X]).
predicate(bigger_than(X,Y),bigger_than,[X,Y]).
The first argument to predicate is an atom that can be used in the head of a rule;
the second argument is the predicate part of the atom as a constant; and the third
argument is a list of the variables used in the head.
A definition for an induce predicate is presented in figure 11.11. The rule predicate
uses the predicate hb (for “head-body”) to generate an atom for the head and a list of
literals for the body. To deal with the body, in the second clause of hb , each literal L
(an atom or its negation) is checked to ensure that its predicate Q is different from the
predicate in the head P , and its arguments U are among the arguments in the head V
(using the auxiliary predicate subl ). In addition, a negative literal is generated only
if the rest of the body B is empty or begins with a negative literal.
11.3.2 An example of induction
To show the induce predicate in action, a new knowledge base about animals is pro-
vided in figure 11.12. There are a number of individuals that are animals of different
types, and a number of predicates to learn about.
 
 
Search WWH ::




Custom Search