Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs

Similar documents
Propositional Logic: Semantics and an Example

Propositional Logic: Bottom-Up Proofs

Logic: Intro & Propositional Definite Clause Logic

Reasoning Under Uncertainty: Introduction to Probability

Logic: Bottom-up & Top-down proof procedures

Reasoning Under Uncertainty: Introduction to Probability

Logic: Top-down proof procedure and Datalog

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Logic: Resolution Proofs; Datalog

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Reasoning under Uncertainty: Intro to Probability

CSCI 5582 Artificial Intelligence. Today 9/28. Knowledge Representation. Lecture 9

Propositional Reasoning

Artificial Intelligence. Propositional logic

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz )

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Reasoning under Uncertainty: Intro to Probability

AI Programming CS S-09 Knowledge Representation

Inference in Propositional Logic

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

Knowledge Representation. Propositional logic

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5

Discrete Mathematics

Logic: Propositional Logic (Part I)

Deductive Systems. Lecture - 3

Knowledge based Agents

Knowledge Representation. Propositional logic.

CS 730/830: Intro AI. 1 handout: slides. Wheeler Ruml (UNH) Lecture 11, CS / 15. Propositional Logic. First-Order Logic

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague, such as: this paint is grey.

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Inference Methods In Propositional Logic

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Logical Agents (I) Instructor: Tsung-Che Chiang

Propositional Logic: Methods of Proof (Part II)

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Dieter Fox, Henry Kautz )

Propositional Logic: Methods of Proof (Part II)

Logical Agents. Santa Clara University

Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction

Agents that reason logically

Propositional Logic: Review

Warm-Up Problem. Is the following true or false? 1/35

Inference Methods In Propositional Logic

Lecture Overview [ ] Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 6. Motivation. Logical Agents

Propositions. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 5.1, Page 1

CS 730/830: Intro AI. 2 handouts: slides, asst 5. Wheeler Ruml (UNH) Lecture 10, CS / 19. What is KR? Prop. Logic. Reasoning

Proof Methods for Propositional Logic

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

Natural Deduction for Propositional Logic

Logical Agents. September 14, 2004

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

Advanced Topics in LP and FP

CS:4420 Artificial Intelligence

Logic for Computer Science - Week 4 Natural Deduction

Reasoning Under Uncertainty: Conditional Probability

Propositional Logic: Logical Agents (Part I)

Propositional Logic: Methods of Proof. Chapter 7, Part II

First Order Logic: Syntax and Semantics

Chapter 4: Classical Propositional Semantics

Intelligent Agents. Pınar Yolum Utrecht University

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Logic I - Session 22. Meta-theory for predicate logic

CS 771 Artificial Intelligence. Propositional Logic

Deliberative Agents Knowledge Representation I. Deliberative Agents

Artificial Intelligence Chapter 7: Logical Agents

Foundations of Artificial Intelligence

Propositional Logic: Methods of Proof (Part II)

CS 4700: Foundations of Artificial Intelligence

Propositional logic (revision) & semantic entailment. p. 1/34

Artificial Intelligence

Propositional Logic Part 1

KB Agents and Propositional Logic

CS156: The Calculus of Computation

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

CS 730/730W/830: Intro AI

Logical Agent & Propositional Logic

Intelligent Systems (AI-2)

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Learning Goals of CS245 Logic and Computation

Propositional logic II.

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

= x ( x 2 4 ) [factor out x] (2)

Propositional Logic: Logical Agents (Part I)

PHIL 50 - Introduction to Logic

Warm-Up Problem. Write a Resolution Proof for. Res 1/32

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Intelligent Systems (AI-2)

COMP3702/7702 Artificial Intelligence Week 5: Search in Continuous Space with an Application in Motion Planning " Hanna Kurniawati"

Logical Agents. Outline

Transcription:

Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Computer Science cpsc322, Lecture 20 (Textbook Chpt 5.1.2-5.2.2 ) June, 6, 2017 CPSC 322, Lecture 20 Slide 1

Lecture Overview Recap: Logic intro Propositional Definite Clause Logic: Semantics PDCL: Bottom-up Proof CPSC 322, Lecture 20 Slide 2

Logics as a R&R system formalize a domain reason about it CPSC 322, Lecture 20 Slide 3

Logics in AI: Similar slide to the one for planning Propositional Definite Clause Logics Semantics and Proof Theory Propositional Logics First-Order Logics Satisfiability Testing (SAT) Description Logics Ontologies Production Systems Cognitive Architectures Hardware Verification Product Configuration Semantic Web Video Games Information Extraction Summarization Tutoring Systems CPSC 322, Lecture 18 Slide 4

Propositional (Definite Clauses) Logic: Syntax We start from a restricted form of Prop. Logic: Only two kinds of statements that a proposition is true that a proposition is true if one or more other propositions are true CPSC 322, Lecture 20 Slide 5

Lecture Overview Recap: Logic intro Propositional Definite Clause Logic: Semantics PDCL: Bottom-up Proof CPSC 322, Lecture 20 Slide 6

Propositional Definite Clauses Semantics: Interpretation Semantics allows you to relate the symbols in the logic to the domain you're trying to model. An atom can be.. Definition (interpretation) An interpretation I assigns a truth value to each atom. If your domain can be represented by four atoms (propositions): So an interpretation is just a.. CPSC 322, Lecture 20 Slide 7

PDC Semantics: Body We can use the interpretation to determine the truth value of clauses and knowledge bases: Definition (truth values of statements): Abody b 1 b 2 is true in I if and only if b 1 is true in I and b 2 is true in I. p q r s I 1 true true true true I 2 false false false false I 3 true true false false I 4 true true true false I 5 true true false true CPSC 322, Lecture 20 Slide 8

PDC Semantics: definite clause Definition (truth values of statements cont ): Arule h b is false in I if and only if b is true in I and h is false in I. p q r s I 1 true true true true I 2 false false false false I 3 true true false false I 4 true true true false......... In other words: if b is true I am claiming that h must be true, otherwise I am not making any claim CPSC 322, Lecture 20 Slide 9

PDC Semantics: Knowledge Base (KB) A knowledge base KB is true in I if and only if every clause in KB is true in I. p q r s I 1 true true false false Which of the three KB below are True in I 1? A B C p r s q p p q s q p q r s

PDC Semantics: Knowledge Base (KB) A knowledge base KB is true in I if and only if every clause in KB is true in I. p q r s I 1 true true false false KB 1 KB 2 KB 3 p r s q p p q s q p q r s Which of the three KB above are True in I 1?KB 3

PDC Semantics: Knowledge Base Definition (truth values of statements cont ): Aknowledge base KB is true in I if and only if every clause in KB is true in I. CPSC 322, Lecture 20 Slide 12

Models Definition (model) Amodel of a set of clauses (a KB) is an interpretation in which all the clauses are true. CPSC 322, Lecture 20 Slide 13

Example: Models p KB q. r p q r s I 1 true true true true I 2 false false false false I 3 true true false false I 4 true true true false I 5 true true false true q. s. Which interpretations are models? CPSC 322, Lecture 20 Slide 14

Logical Consequence Definition (logical consequence) If KB is a set of clauses and G is a conjunction of atoms, G is a logical consequence of KB, written KB G, if G is true in every model of KB. we also say that G logically follows from KB, or that KB entails G. In other words, KB G if there is no interpretation in which KB is true and G is false. CPSC 322, Lecture 20 Slide 15

Example: Logical Consequences p q r s I 1 true true true true I 2 true true true false I 3 true true false false KB p r q. q. s. I 4 true true false true I 5 false true true true I 6 false true true false I 7 false true false false I 8 false true false true. Which of the following is true? KB q, KB p, KB s, KB r CPSC 322, Lecture 20 Slide 16

Lecture Overview Recap: Logic intro Propositional Definite Clause Logic: Semantics PDCL: Bottom-up Proof CPSC 322, Lecture 20 Slide 17

One simple way to prove that G logically follows from a KB Collect all the models of the KB Verify that G is true in all those models Any problem with this approach? The goal of proof theory is to find proof procedures that allow us to prove that a logical formula follows form a KB avoiding the above CPSC 322, Lecture 20 Slide 18

Soundness and Completeness If I tell you I have a proof procedure for PDCL What do I need to show you in order for you to trust my procedure? KB G means G can be derived by my proof procedure from KB. Recall KB G means G is true in all models of KB. Definition (soundness) Aproof procedure is sound if KB G implies KB G. Definition (completeness) Aproof procedure is complete if KB G implies KB G. CPSC 322, Lecture 20 Slide 19

Bottom-up Ground Proof Procedure One rule of derivation, a generalized form of modus ponens: If h b 1 b m is a clause in the knowledge base, and each b i has been derived, then h can be derived. You are forward chaining on this clause. (This rule also covers the case when m=0. ) CPSC 322, Lecture 20 Slide 20

Bottom-up proof procedure KB G if G C at the end of this procedure: C :={}; repeat select clause h b 1 b m in KB such that b i C for all i, and h C; C := C { h } until no more clauses can be selected. KB: e a b a b r f CPSC 322, Lecture 20 Slide 21

KB. Bottom-up proof procedure: Example z f e q f g z e a b a b r f A. B. C :={}; repeat select clause h b 1 b m in KB such that b i C for all i, and h C; C := C { h } until no more clauses can be selected. C. Slide 22 CPSC 322, Lecture 20

Bottom-up proof procedure: Example z f e q f g z e a b a b r f C :={}; repeat select clause h b 1 b m in KB such that b i C for all i, and h C; C := C { h } until no more clauses can be selected. CPSC 322, Lecture 20 Slide 23

Bottom-up proof procedure: Example z f e q f g z e a b a b r f C :={}; repeat select clause h b 1 b m in KB such that b i C for all i, and h C; C := C { h } until no more clauses can be selected. r? q? z? CPSC 322, Lecture 20 Slide 24

You can: Learning Goals for today s class Verify whether an interpretation is a model of a PDCL KB. Verify when a conjunction of atoms is a logical consequence of a knowledge base. Define/read/write/trace/debug the bottom-up proof procedure. CPSC 322, Lecture 4 Slide 25

(still section 5.2) Next class Soundness and Completeness of Bottom-up Proof Procedure Using PDC Logic to model the electrical domain Reasoning in the electrical domain CPSC 322, Lecture 20 Slide 26

Study for midterm (This Thurs) Midterm: 6 short questions (8pts each) + 2 problems (26pts each) Study: textbook and inked slides Work on all practice exercises and revise assignments! While you revise the learning goals, work on review questions (posted on Connect) I may even reuse some verbatim Also work on couple of problems (posted on Connect) from previous offering (maybe slightly more difficult) but I ll give you the solutions CPSC 322, Lecture 20 Slide 27

midterm (This Thurs) Midterm on June 8 first block of class Search CSP SLS Planning Possibly simple/minimal intro to logics CPSC 322, Lecture 20 Slide 28