240 likes | 363 Views
Lecture 12. First-Order Logic (FOL) Review. Friday, 17 September 2004 William H. Hsu Department of Computing and Information Sciences, KSU http://www.kddresearch.org http://www.cis.ksu.edu/~bhsu Reading: Sections 7.5 – 7.10, Russell and Norvig 2e. Lecture Outline. Today’s Reading
E N D
Lecture 12 First-Order Logic (FOL) Review Friday, 17 September 2004 William H. Hsu Department of Computing and Information Sciences, KSU http://www.kddresearch.org http://www.cis.ksu.edu/~bhsu Reading: Sections 7.5 – 7.10, Russell and Norvig 2e
Lecture Outline • Today’s Reading • Sections 7.5 – 7.10, Russell and Norvig 2e • Recommended references: Nilsson and Genesereth • Next Week’s Reading: Chapter 8, R&N • Previously: Logical Agents and Calculi • Logical agent framework • Logic in general: tools for • Knowledge representation • Inference / theorem proving and problem solving / planning • Propositional calculus • Normal forms • Sequent rules (modus ponens, resolution) • Predicate logic • First-order logic (FOL) aka first-order predicate calculus (FOPC) • Today: FOL Agents, Examples; Frame Problem; Situation Calculus • Next Week: FOL Knowledge Bases (Chapter 8, R&N)
Review:Simple Knowledge-Based Agent Chapter 7 R&N 2e Adapted from slides by S. Russell, UC Berkeley
Review: Elements of FOL • Logical Agents Overview (Last Tuesday) • Knowledge Bases (KB) and KB agents • Motivating example: Wumpus World • Syntax of propositional calculus • Elements of logic in general • Syntax: What constitutes legitimate sentences akawell-formed formulae? • Semantics: What constitutes logical entailment? • Proof theory: What constitutes provability? Soundness? Completeness? • Propositional and First-Order Calculi (Last Thursday) • Propositional calculus (concluded): inference by model checking, sequent rules • Elements of logic in general: normal forms (CNF, DNF, Horn) and their usage • Predicate logic without quantifiers: functions and predicates, terms and atoms • Introduction to First-Order Logic (FOL) • Domain theory • Syntax of WFFs: proper scoping (existential, universal quantification) • New features: semantics of quantification
Validity and Satisfiability Adapted from slides by S. Russell, UC Berkeley
Proof Methods Adapted from slides by S. Russell, UC Berkeley
Inference (Sequent) Rules forPropositional Logic Adapted from slides by S. Russell, UC Berkeley
Logical Agents:Taking Stock Adapted from slides by S. Russell, UC Berkeley
The Road Ahead:Predicate Logic and FOL • Predicate Logic • Enriching language • Predicates • Functions • Syntax and semantics of predicate logic • First-Order Logic (FOL, FOPC) • Need for quantifiers • Relation to (unquantified) predicate logic • Syntax and semantics of FOL • Fun with Sentences • Wumpus World in FOL Adapted from slides by S. Russell, UC Berkeley
Syntax of FOL:Basic Elements Adapted from slides by S. Russell, UC Berkeley
FOL: Atomic Sentences(Atomic Well-Formed Formulae) Adapted from slides by S. Russell, UC Berkeley
Equality Adapted from slides by S. Russell, UC Berkeley
Jigsaw Exercise [1]:First-Order Logic Sentences • “Every Dog Chases Its Own Tail” • d . Chases (d, tail-of (d)) • Alternative Statement: d . t . Tail-Of (t, d) Chases (d, t) • Prefigures concept of Skolemization (Skolem variables / functions) • “Every Dog Chases Its Own (Unique) Tail” • d . 1t . Tail-Of (t, d) Chases (d, t) d . t . Tail-Of (t, d) Chases (d, t) [ t’ Chases (d, t’) t’ = t] • “Only The Wicked Flee when No One Pursueth” • x . Flees (x) [¬ y Pursues (y, x)] Wicked (x) • Alternative : x . [ y . Flees (x, y)] [¬ z . Pursues (z, x)] Wicked (x) • Offline Exercise: What Is An nth Cousin, m Times Removed?
Terminology • Logical Frameworks • Knowledge Bases (KB) • Logic in general: representation languages, syntax, semantics • Propositional logic • First-order logic (FOL, FOPC) • Model theory, domain theory: possible worlds semantics, entailment • Normal Forms • Conjunctive Normal Form (CNF) • Disjunctive Normal Form (DNF) • Horn Form • Proof Theory and Inference Systems • Sequent calculi: rules of proof theory • Derivability or provability • Properties • Soundness (derivability implies entailment) • Completeness (entailment implies derivability)
More Fun with Sentences • “Every Dog Chases Its Own Tail” • d . Chases (d, tail-of (d)) • Alternative Statement: d . t . Tail-Of (t, d) Chases (d, t) • Prefigures concept of Skolemization (Skolem variables / functions) • “Every Dog Chases Its Own (Unique) Tail” • d . 1t . Tail-Of (t, d) Chases (d, t) d . t . Tail-Of (t, d) Chases (d, t) [ t’ Chases (d, t’) t’ = t] • “Only The Wicked Flee when No One Pursueth” • x . Flees (x) [¬ y Pursues (y, x)] Wicked (x) • Alternative : x . [ y . Flees (x, y)] [¬ z . Pursues (z, x)] Wicked (x) • Offline Exercise: What Is An nth Cousin, m Times Removed?
Wumpus World Revisited:Interacting with FOL KBs Adapted from slides by S. Russell, UC Berkeley
Knowledge Base forThe Wumpus World Adapted from slides by S. Russell, UC Berkeley
Deducing Hidden Properties Adapted from slides by S. Russell, UC Berkeley
Keeping Track of Change:Situation Calculus Adapted from slides by S. Russell, UC Berkeley
Describing Actions [1]:Frame, Qualification, and Ramification Problems Adapted from slides by S. Russell, UC Berkeley
Describing Actions [2]:Successor State Axioms Adapted from slides by S. Russell, UC Berkeley
Summary Points • Previously: Logical Agents and Calculi • Logic in general: tools for KR, inference, planning • Propositional calculus: normal forms, sequent rules • Predicate logic • First-order logic (FOL) aka first-order predicate calculus (FOPC) • Today: FOL in Practice • FOL agents • Example: Wumpus World in FOL • Situation calculus • Frame problem and variants (see R&N sidebar) • Representational vs. inferential frame problems • Qualification problem: “what if?” • Ramification problem: “what else?” (side effects) • Successor-state axioms • Thursday: FOL Knowledge Bases (Chapter 8, R&N), Sequent Rules for FOL
Terminology • Logical Languages • Propositional logic • Predicates, terms, functions, atoms (atomic sentences / atomic WFFs), WFFs • First-order logic (FOL, FOPC): universal and existentialquantification • Properties of Knowledge Bases (KBs) • Satisfiability and validity • Entailment and provability • Properties of Proof Systems: Soundness and Completeness • Normal Forms: CNF, DNF, Horn; Clauses vs. Terms • Situation Calculus • Frame, Ramification, Qualification Problems • Successor-State Axiomatization