Professional Documents
Culture Documents
Tell Tell
KB KB
Ask Ask
Inference engine
Introduction to AI by Prof. A. MESLEH 6
How a KB performs
Each time the agent program is called, it does two
things:
1. it TELLs the KB what it perceives
2. it ASKs the KB what action to perform
Reasoning
The process is concluding the action from the sentences in
the KB
This reasoning is done logically
The action found is proved to be better than all others
(given that an agent knows its goals)
Note: (P Q) equivalent to P Q
Quantifier’s Problems
Problem?
Quantifiers are not commutative
The order cannot be interchanged
Similar to a query
If we want to specify the precedence,
we should use ( )
e.g., y ( x Loves (x, y) )
SUBST({v/g}, )
Examples:
{x / John}, {x / Richard}, {x / Father(John)}
SUBST({v/k}, )
x Crown(x) OnHead(x, John)
We can infer:
Crown(C1) OnHead(C1, John)
If C1 does not appear elsewhere in the KB
In other words:
the ’d sentence can be replaced by ONE instantiation and.
the ’d sentence can be replaced by the set of all possible
instantiations.
The last unification fails? Because x can not take ‘John’ and
‘Elizabeth’ at the same time.
How to avoid this problem?
1.
2.
3.
Which uses the same variable name twice, change the name of one of the variables;
so our example becomes:
The general rule is that the arguments of the skolem function are
all the universally quantified variables in whose scope the
existential quantifier appears.
As with existential instantiation, the skolemized sentence is
satisfiable exactly when the original sentence is satisfiable.
6.
Notes:
1- Fortunately, humans seldom need to look at a CNF sentence - all the
translation process is easily automated.
2- F(x) refers to animal potentially unloved by x.
3- G(x) refers to someone who may love x.