9/18/2000copyright Brian Williams1 Propositional Logic Brian C. Williams 16.412J/6.834J October 10, 2001.

Slides:



Advertisements
Similar presentations
Agents that reason logically Tuomas Sandholm Carnegie Mellon University Computer Science Department.
Advertisements

UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Propositional Logic Russell and Norvig: Chapter 6 Chapter 7, Sections 7.1—7.4 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm.
Logic.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 6 Dr Souham Meshoul CAP492.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Logical Agents Chapter 7.
Knoweldge Representation & Reasoning
CS 4700: Foundations of Artificial Intelligence
Logical Agents Chapter 7 Feb 26, Knowledge and Reasoning Knowledge of action outcome enables problem solving –a reflex agent can only find way from.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2005.
Rutgers CS440, Fall 2003 Propositional Logic Reading: Ch. 7, AIMA 2 nd Ed. (skip )
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
3/19/2003copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams November 22 nd, 2004.
Logical Agents Chapter 7 (based on slides from Stuart Russell and Hwee Tou Ng)
February 20, 2006AI: Chapter 7: Logical Agents1 Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent.
Logical Agents (NUS) Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
3/11/2002copyright Brian Williams1 Propositional Logic and Satisfiability Brian C. Williams /6.834 October 7 th, 2002.
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
Fall 98 Introduction to Artificial Intelligence LECTURE 7: Knowledge Representation and Logic Motivation Knowledge bases and inferences Logic as a representation.
Logical Agents Logic Propositional Logic Summary
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
1 Logical Agents Chapter 7. 2 A simple knowledge-based agent The agent must be able to: –Represent states, actions, etc. –Incorporate new percepts –Update.
Knowledge Representation Lecture # 17, 18 & 19. Motivation (1) Up to now, we concentrated on search methods in worlds that can be relatively easily represented.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
Computer Science CPSC 322 Lecture 22 Logical Consequences, Proof Procedures (Ch 5.2.2)
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents Chapter 7 Part I. 2 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
1 Intro to AI Logical Agents. 2 Intro to AI Outline Logic Efficient satisfiability testing by backtracking search Efficient satisfiability testing by.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents. Inference : Example 1 How many variables? 3 variables A,B,C How many models? 2 3 = 8 models.
CS666 AI P. T. Chung Logic Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Propositional Logic: Logical Agents (Part I)
CS 4700: Foundations of Artificial Intelligence
Model-based Diagnosis: The Single Fault Case
EA C461 – Artificial Intelligence Logical Agent
Logical Inference 4 wrap up
EA C461 – Artificial Intelligence Logical Agent
Logical Agents Chapter 7 Selected and slightly modified slides from
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
Logical Agents.
Logical Agents Chapter 7.
Artificial Intelligence
Logical Agents Chapter 7.
Knowledge Representation I (Propositional Logic)
Fast SAT through Incremental Unit Propagation
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

9/18/2000copyright Brian Williams1 Propositional Logic Brian C. Williams J/6.834J October 10, 2001

9/18/2000copyright Brian Williams2 Assignments Readings: Chapter 6 of AIMA “Generating hard satisfiability problems” by Selman, Mitchell and Levesque. Optional Advanced: “Finding Hard Instances of the Satisfiability Problem: A Survey” by Cook and Mitchell. Handout: Guidelines for Project

9/18/2000copyright Brian Williams3 Assignment Homework: Project proposal due Wed, October 17 th. Complete draft of lecture slides Wed, Oct. 17 th and pass to another team for feedback. Sign up for presentation time.

9/18/2000copyright Brian Williams4 Outline Why propositional inference? Propositional logic Satisfiability by enumeration Summary

Monitors Autonomous Agents: What is missing? Command dispatch Fault protection Attitude control Mission Goal Scenario Self-commandingSelf-diagnosingSelf-repairing RECOVERY PLANNING EXECUTION

9/18/2000copyright Brian Williams6 sense P(s) WORLD observations actions AGENT Diagnostic Agent: Monitors & Diagnoses Repairs & Avoids Probes and Tests Plant act Reasons about hidden state

9/18/2000copyright Brian Williams7 What is Fault Diagnosis? Given a system with symptomatic behavior, find diagnoses that eliminate symptoms Symptom M1 M2 M3 A1 A2 A B C D E F G X Y Z Constraint Suspension

9/18/2000copyright Brian Williams8 AI Conventional Wisdom “[For reactive systems] proving theorems is out of the question” [Agre & Chapman 87]

9/18/2000copyright Brian Williams9 Propositional Satisfiability In recent years, we’ve seen substantial progress in propositional reasoning and search methods. Boolean satisfiability testing: 1990: 100 variables / 200 clauses (constraints) 1998: 10, ,000 vars / 10^6 clauses Novel applications: e.g. diagnosis, planning, software / circuit testing, machine learning, and protein folding

9/18/2000copyright Brian Williams10 Methodology for Fast Inference Combinatorial Task Propositional Propositional Logic Encoding Satisfiability Solver Decode Results Shift work to “encoding phase’’, use fast, off-the-shelf SAT solver and tools.

9/18/2000copyright Brian Williams11 Outline Why propositional inference? Propositional logic Satisfiability by enumeration Summary

9/18/2000copyright Brian Williams12 Logic in General Logics formal languages for representing information such that conclusions can be drawn. Syntax defines the sentences in the language. Semantics define the “meaning” of sentences; i.e., truth of a sentence in a world.

9/18/2000copyright Brian Williams13 Propositional Logic: Syntax Proposition Statement that is true or false (valve v1) (= voltage high) Propositional sentence (S) S ::= proposition | (NOT S) | (OR S1... Sn) | (AND S1... Sn) Defined Constructs (implies S1 S2) => ((not S1) OR S2) (IFF S1 S2) => (AND (IMPLIES S1 S2)(IMPLIES S2 S1))...

9/18/2000copyright Brian Williams14 Engine Example: propositional logic model (mode(E1) = ok implies (thrust(E1) = on exactly when flow(V1) = on and flow(V2) = on)) and (mode(E1) = ok or mode(E1) = unknown) and not (mode(E1) = ok and mode(E1) = unknown) E1 V1V2

9/18/2000copyright Brian Williams15 Propositional Logic: Semantics A model assigns true/false to every proposition symbol P i A = True, B = False, C = False Truth determined by applying boolean operators to model: Not S is True iff S is False S 1 and S 2 is True iff S 1 is True and S 2 is True S 1 or S 2 is True iff S 1 is True or S 2 is True S 1 implies S 2 is True iff S 1 is False or S 2 is True S 1 iff S 2 is True iff S 1 implies S 2 is True or S 2 implies S 1 is True

9/18/2000copyright Brian Williams16 Entailment and Models Given knowledge base KB, and sentence  KB entails  iff  is true in all models where KB is true Example KB = “Giants won”, “Reds won”  = “Either the Giants won or the Reds won”

9/18/2000copyright Brian Williams17 Models and Entailment m is a model of sentence  if  is true given m. M(  ) denotes the set of all models of sentence  Entailment KB entails  iff M(KB) subset M(  ) M(  ) M(KB)

9/18/2000copyright Brian Williams18 Outline Why propositional inference? Propositional logic Satisfiability by enumeration Summary

9/18/2000copyright Brian Williams19 Propositional Inference: Enumeration Method KB = (A or C) and (B or not C)  = A or B Does KB entail  ? ABCA or CB or not CKB  False True FalseTrueFalse True False TrueFalseTrue False True

9/18/2000copyright Brian Williams20 Propositional Inference: Enumeration Method KB = (A or C) and (B or not C)  = A or B Does KB entail  ? ABCA or CB or not CKB  False TrueFalse True False TrueFalse TrueFalseTrue FalseTrue False True FalseTrue False True FalseTrue

9/18/2000copyright Brian Williams21 Propositional Satisfiability by Enumeration Assign true or false to an unassigned proposition. Backtrack as soon as a clause is violated. Example: C1: Not A or B C2: Not C or A C3: Not B or C A FT B FT C FT C FT B FT CC FTFT

9/18/2000copyright Brian Williams22 Backtrack Search Procedure BT(phi,A) Input: A cnf theory phi, an assignment A to propositions in phi Output: A decision of whether phi is satisfiable. 1. If a clause is violated return(false); 2. Else if all propositions are assigned return(true); 3. ElseQ = some unassigned proposition in phi; 4.Return (BT(phi, A[Q = True]) or 5. BT(phi, A[Q = False])

9/18/2000copyright Brian Williams23 Validity and Satisfiability A sentence is valid if it is true in all models. A sentence is satisfiable if it is true in some model. A sentence is unsatisfiable if it is true in no model. Validity connects to entailment by the Deduction Theorem: KB entails  iff “KB implies  ” is valid Satisfiability connects to entailment by Reductio Ad Absurdum: KB entails  iff “KB and not  ” is unsatisfiable.

9/18/2000copyright Brian Williams24 Types of Logic Logics are characterized by their primitives Ontological commitment: – what exists? facts, objects, time, beliefs Epistemological commitment: - states of knowledge? True, false, unknown … LanguageOntological Commitment Epistemological Commitment Propositional LogicfactsTrue/false/unknown First-order LogicFacts,objects,relationsTrue/false/unknown Temporal logicFacts,objects,relations, times True/false/unknown Probability theoryfactsDegree of belief 0…1 Fuzzy logicDegree of truthDegree of belief 0…1

9/18/2000copyright Brian Williams25 Logic Example: Arithmetic Syntax – legal sentences X + 2 > Y is a sentence. X 2 + Y > is not a sentence. Semantics - truth in world X + 2 > Y is true iff the number x + 2 is not less than or equal to the number y X + 2 > Y is true in a world where X = 7, Y = 1 X + 2 > Y is false in a world where X = 0, Y = 6

9/18/2000copyright Brian Williams26 Outline Why propositional inference? Propositional logic Satisfiability by enumeration Summary

9/18/2000copyright Brian Williams27 Summary Logical agents apply inference to a knowledge base to derive new information and make decisions. Basic concepts in logic Syntax: formal structure of sentences. Semantics: truth of sentence wrt models. Entailment: necessary truth of a sentence given another. Inference: deriving sentences from others. Soundness: derivations produce only entailed sentences. Completeness: derivations can produce all entailed sentences. Enumeration method is sound and complete for propositional logic.

9/18/2000copyright Brian Williams28 Models and Truth A model assigns true/false to every proposition symbol The truth of a sentence wrt a model. is determined by applying boolean operators (and, or, not) to the model. A sentence is valid if it is true in all models. A sentence is satisfiable if it is true in some model. A sentence is unsatisfiable if it is true in no model.

9/18/2000copyright Brian Williams29 Propositional Satisfiability by Depth First Search Assign true or false to an unassigned proposition. Backtrack as soon as a clause is violated. Satisfiable if assignment is complete. Example: C1: Not A or B C2: Not C or A C3: Not B or C A FT B FT C FT C FT B FT CC FTFT

9/18/2000copyright Brian Williams30 Entailment KB entails  iff  is true in all models where KB is true. Proving Entailment: KB entails  iff (KB implies  ) is valid KB entails  iff (KB and not  ) is unsatisfiable. M(  ) M(KB)