Documente Academic
Documente Profesional
Documente Cultură
food(Peanuts)
∀x,y eats(x,y) ∧¬killed(x) ⇒ food(y)
¬ killed(Bill) food(chicken)
food(apples) eats(Bill,Peanuts)
More Efficient Forward
Chaining
Checking all rules will take too much
time.
In reality,knowledge
the base
eats(John, y) Yes, y/peanuts
algorithm would
include all appropriatefood (y) Yes, y/peanuts
rules.
eats(x,y) ¬killed(x)
Yes, x/Bill, y/peanuts Yes, x/Bill
Backward Chaining
• Depth First recursive proof
• space is linear in size of proof.
• Incomplete
• infinite loops
• Can be inefficient
• repeated subgoals
FOL to CNF
Resolution requires that FOL
sentences be represented in
Conjunctive Normal Form (CNF)
Everyone who loves all animals is loved
by someone.
FOL: ∀x[∀y Animal ( y ) ⇒ Loves( x, y )] ⇒ [∃y Loves( y, x )]
CNF:
[ Animal ( F ( x )) ∨ Loves(G ( x ), x )] ∧ [¬Loves( x, F ( x )) ∨ Loves(G ( x ), x )]
Resolution
Resolution
a single inference rule
provides a complete inference
algorithm when coupled with any
complete search algorithm.
¬killed(Bill)
∀x eats (Bill,x) ⇒ eats(Sue,x) ¬ eats (Bill,x) ∨eats(Sue,x)
Forward & Backward Chaining Resolution
Resolution Proof
{x/Bill, y/peanuts}
¬killed(Bill)
∀x eats (Bill,x) ⇒ eats(Sue,x) ¬ eats (Bill,x) ∨eats(Sue,x)
Forward & Backward Chaining Resolution
Resolution refutation proof
Start with: ¬ eats(John, peanuts)
{x/Peanuts}
{y/Peanuts}