Lecture_ai_5 - WordPress.com

advertisement
Artificial Intelligence
Lecture 5
Clause
• Is a representation of facts where different
literals have disjunctive relation
• Typesground clause and horn clause
• Ground clausewithout any variable
• Example a()
• Horn clause at most one positive clause
• Examplea(x,y)
Considerations for clauses
• A given relation can have any number of objects
• A predicate can have any number of arguments
including zero.
• Number of arguments  arity
• An object name can represent a physical
entity(Bob,automobile)/an abstract concept(defective)
• Can be noun , adverb or adjective
• Objects must be singular
• Names reserved for prolog should not be used as
object name
Steps for converting propositional logic
to causal form
Steps for conversion in elaborated
form
Steps for conversion in elaborated
form(Cont..)
Steps for conversion in elaborated
form(Cont..)
Skolemisation
• Is the process of eliminating existential
quantifier
• Steps of skolemisation
Resolution
• Is the process of proving theorem based on
some clauses
Types of resolution
• Unit resolution
• Binary resolution
• Linear resolution
Definition of different types of
resolution
Algorithm on Resolution
Example
1. Ravi likes all kind of food.
2. Apples and chicken are food
3. Anything anyone eats and is not killed is food
4. Ajay eats peanuts and is still alive
5. Rita eats everything that Ajay eats
Prove that Ravi likes peanuts using resolution.
• Step 1: Converting the given statements into
Predicate/Propositional Logic
i. ∀x : food(x) → likes (Ravi, x)
ii. food (Apple) ^ food (chicken)
iii. ∀a : ∀b: eats (a, b) ^ ~ killed (a) → food (b)
iv. eats (Ajay, Peanuts) ^ alive (Ajay)
v. ∀c : eats (Ajay, c) → eats (Rita, c)
vi. ∀d : alive(d) → ~killed (d)
vii. ∀e: ~killed(e) → alive(e)
Conclusion: likes (Ravi, Peanuts)
• Step 2: Convert into Clausal form
i. ~food(x) v likes (Ravi, x)
ii. Food (apple)
iii. Food (chicken)
iv. ~ eats (a, b) v killed (a) v food (b)
v. Eats (Ajay, Peanuts)
vi. Alive (Ajay)
vii. ~eats (Ajay, c) V eats (Rita, c)
viii. ~alive (d) v ~ killed (d)
ix. Killed (e) v alive (e)
• Step 3: Negate the conclusion
~ likes (Ravi, Peanuts)
Step 4: Resolve using a resolution tree
Download