cs 730 830 intro ai
play

CS 730/830: Intro AI Reasoning Inference in FOL assignments 6 and - PowerPoint PPT Presentation

CS 730/830: Intro AI Reasoning Inference in FOL assignments 6 and 7 are posted Wheeler Ruml (UNH) Lecture 12, CS 730 1 / 16 Reasoning Logic First-Order Logic The Joy of Power Inference in FOL Reasoning in First-order Logic


  1. CS 730/830: Intro AI Reasoning Inference in FOL assignments 6 and 7 are posted Wheeler Ruml (UNH) Lecture 12, CS 730 – 1 / 16

  2. Reasoning ■ Logic ■ First-Order Logic ■ The Joy of Power Inference in FOL Reasoning in First-order Logic Wheeler Ruml (UNH) Lecture 12, CS 730 – 2 / 16

  3. Logic A logic is a formal system: Reasoning ■ Logic syntax: defines sentences ■ ■ First-Order Logic ■ The Joy of Power semantics: relation to world ■ Inference in FOL inference rules: reaching new conclusions ■ three layers: proof, models, reality flexible, general, and principled form of KR Wheeler Ruml (UNH) Lecture 12, CS 730 – 3 / 16

  4. First-Order Logic 1. Things: Reasoning ■ Logic constants: John , Chair23 ■ ■ First-Order Logic ■ The Joy of Power functions (thing → thing): MotherOf(John) , SumOf(1,2) ■ Inference in FOL 2. Relations: predicates (objects → T/F): IsWet(John) , ■ IsSittingOn(MotherOf(John),chair23) 3. Complex sentences: connectives: IsWet(John) ∨ ■ IsSittingOn(MotherOf(John),Chair23) quantifiers and variables: ∀ person ... , ∃ person ... ■ Wheeler Ruml (UNH) Lecture 12, CS 730 – 4 / 16

  5. More First-Order Logic Reasoning ∀ person ∀ time ( ItIsRaining ( time ) ∧ ■ Logic ■ First-Order Logic ¬∃ umbrella Holding ( person , umbrella , time )) → ■ The Joy of Power IsWet ( person , time ) Inference in FOL John loves Mary. All crows are black. Dolphin are mammals that live in the water. Everyone loves someone. Mary likes the color of one of John’s ties. I can’t hold more than one thing at a time. Wheeler Ruml (UNH) Lecture 12, CS 730 – 5 / 16

  6. The Joy of Power 1. Indirect knowledge: Tall(MotherOf(John)) Reasoning 2. Counterfactuals: ¬ Tall ( John ) ■ Logic ■ First-Order Logic 3. Partial knowledge (disjunction): ■ The Joy of Power IsSisterOf ( b , a ) ∨ IsSisterOf ( c , a ) Inference in FOL 4. Partial knowledge (indefiniteness): ∃ x IsSisterOf ( x , a ) Wheeler Ruml (UNH) Lecture 12, CS 730 – 6 / 16

  7. Reasoning Inference in FOL ■ Clausal Form ■ Example ■ Break ■ Unification ■ Example ■ Tricky Cases ■ Refuatation Reasoning in First-order Logic ■ Completeness ■ EOLQs Wheeler Ruml (UNH) Lecture 12, CS 730 – 7 / 16

  8. Clausal Form 1. Eliminate → using ¬ and ∨ Reasoning 2. Push ¬ inward using de Morgan’s laws Inference in FOL ■ Clausal Form 3. Standardize variables apart ■ Example 4. Eliminate ∃ using Skolem functions ■ Break ■ Unification 5. Move ∀ to front ■ Example 6. Move all ∧ outside any ∨ (CNF) ■ Tricky Cases ■ Refuatation 7. Can finally remove ∀ and ∧ ■ Completeness ■ EOLQs Wheeler Ruml (UNH) Lecture 12, CS 730 – 8 / 16

  9. Example 1. Cats like fish. Reasoning 2. Cats eat everything they like. Inference in FOL ■ Clausal Form 3. Joe is a cat. ■ Example ■ Break Prove: Joe eats fish. ■ Unification ■ Example ■ Tricky Cases ■ Refuatation ■ Completeness ■ EOLQs Wheeler Ruml (UNH) Lecture 12, CS 730 – 9 / 16

  10. Break asst 5 ■ Reasoning asst 6, 7 ■ Inference in FOL ■ Clausal Form preliminary project proposals due Tue Mar 10 (1.5 weeks) ■ ■ Example ■ Break ■ Unification ■ Example ■ Tricky Cases ■ Refuatation ■ Completeness ■ EOLQs Wheeler Ruml (UNH) Lecture 12, CS 730 – 10 / 16

  11. Unifying Two Terms 1. if one is a constant and the other is Reasoning Inference in FOL 2. a constant: if the same, done; else, fail ■ Clausal Form 3. a function: fail ■ Example ■ Break 4. a variable: substitute constant for var ■ Unification 5. if one is a function and the other is ■ Example ■ Tricky Cases 6. a different function: fail ■ Refuatation ■ Completeness 7. the same function: unify the two arguments lists ■ EOLQs 8. a variable: if var occurs in function , fail 9. otherwise, substitute function for var 10. otherwise, substitute one variable for the other Carry out substitutions on all expressions you are unifying! Build up substitutions as you go, carrying them out before checking expressions? See handout on website. Wheeler Ruml (UNH) Lecture 12, CS 730 – 11 / 16

  12. Example 1. Anyone who can read is literate. Reasoning 2. Dolphins are not literate. Inference in FOL ■ Clausal Form 3. Some dolphins are intelligent. ■ Example 4. Prove: someone intelligent cannot read. ■ Break ■ Unification ■ Example Skolem, standardizing apart ■ Tricky Cases ■ Refuatation ■ Completeness ■ EOLQs Wheeler Ruml (UNH) Lecture 12, CS 730 – 12 / 16

  13. Tricky Cases don’t unify x and f ( x ) ! Reasoning as in P ( x, x ) meets ¬ P ( z, f ( z )) Inference in FOL ■ Clausal Form ■ Example ■ Break note resolvent of P ( f ( x )) and ¬ P ( z ) ∨ P ( f ( z )) ■ Unification ■ Example ■ Tricky Cases Semi-decidable: if yes, will terminate ■ Refuatation ■ Completeness ■ EOLQs Wheeler Ruml (UNH) Lecture 12, CS 730 – 13 / 16

  14. The Basis for Refutation Recall KB | = α iff α true in every model of KB. Reasoning Inference in FOL 1. Assume KB | = α . ■ Clausal Form ■ Example 2. So if a model i satisfies KB, then i satisfies α . ■ Break 3. If i satisfies α , then doesn’t satisfy ¬ α . ■ Unification ■ Example 4. So no model satisfies KB and ¬ α . ■ Tricky Cases 5. So KB ∧¬ α is unsatisfiable. ■ Refuatation ■ Completeness ■ EOLQs The other way: 1. Suppose no model that satisfies KB also satisfies ¬ α . In other words, KB ∧¬ α is unsatisfiable (= inconsistent = contradictory). 2. In every model of KB, α must be true or false. 3. Since in any model of KB, ¬ α is false, α must be true in all models of KB. Wheeler Ruml (UNH) Lecture 12, CS 730 – 14 / 16

  15. Completeness G¨ odel’s Completeness Theorem (1930) says a complete set of Reasoning inference rules exists for FOL. Inference in FOL ■ Clausal Form Herbrand base: substitute all constants and combinations of ■ Example ■ Break constants and functions in place of variables. Potentially infinite! ■ Unification ■ Example Herbrand’s Theorem (1930): If a set of clauses S is unsatisfiable, ■ Tricky Cases ■ Refuatation then there exists a finite subset of its Herbrand base that is also ■ Completeness ■ EOLQs unsatisfiable. Ground Resolution Thm: If a set of ground clauses is unsatisfiable, then the resolution closure of those clauses contains ⊥ . Robinson (1965): If there is a proof on ground clauses, there is a corresponding proof in the original clauses. FOL is semi-decidable: if entailed, will eventually know Wheeler Ruml (UNH) Lecture 12, CS 730 – 15 / 16

  16. EOLQs Please write down the most pressing question you have about Reasoning the course material covered so far and put it in the box on your Inference in FOL ■ Clausal Form way out. ■ Example Thanks! ■ Break ■ Unification ■ Example ■ Tricky Cases ■ Refuatation ■ Completeness ■ EOLQs Wheeler Ruml (UNH) Lecture 12, CS 730 – 16 / 16

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend