Artificial Intelligence. Propositional logic

Similar documents
Logical Agents. Outline

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

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

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

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

Intelligent Agents. Pınar Yolum Utrecht University

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Logical Agents (I) Instructor: Tsung-Che Chiang

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

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

Agents that reason logically

Logical Agents. Chapter 7

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón

Proof Methods for Propositional Logic

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

Artificial Intelligence Chapter 7: Logical Agents

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

Introduction to Artificial Intelligence. Logical Agents

CS 380: ARTIFICIAL INTELLIGENCE

Artificial Intelligence Knowledge Representation I

CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents

Knowledge-based Agents. CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents. Outline. Knowledge-based Agents

Revised by Hankui Zhuo, March 21, Logical agents. Chapter 7. Chapter 7 1

CS 4700: Artificial Intelligence

Artificial Intelligence

Logical Agent & Propositional Logic

TDT4136 Logic and Reasoning Systems

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

Kecerdasan Buatan M. Ali Fauzi

Logical agents. Chapter 7. Chapter 7 1

Artificial Intelligence

7. Logical Agents. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Knowledge base. Models and Planning. Russell & Norvig, Chapter 7.

Logical Agent & Propositional Logic

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World

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

Class Assignment Strategies

Logic. proof and truth syntacs and semantics. Peter Antal

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

CS 7180: Behavioral Modeling and Decision- making in AI

Knowledge based Agents

20/c/applet/more.html Local Beam Search The best K states are selected.

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Logical Agents. Chapter 7

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Logical Agents. September 14, 2004

CS 4700: Foundations of Artificial Intelligence

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

Propositional Logic: Logical Agents (Part I)

CS 771 Artificial Intelligence. Propositional Logic

AI Programming CS S-09 Knowledge Representation

Propositional Logic: Review

Logical Agents: Propositional Logic. Chapter 7

Logical Agents. Santa Clara University

Lecture 7: Logical Agents and Propositional Logic

Lecture 6: Knowledge 1

Last update: March 4, Logical agents. CMSC 421: Chapter 7. CMSC 421: Chapter 7 1

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Logical Agents. Outline

Logic and Inferences

CS:4420 Artificial Intelligence

Logic & Logic Agents Chapter 7 (& background)

Introduction to Intelligent Systems

Introduction to Intelligent Systems

Propositional and First-Order Logic

Lecture 7: Logic and Planning

Inference Methods In Propositional Logic

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

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

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

Inference in Propositional Logic

Propositional Logic: Logical Agents (Part I)

CS 188: Artificial Intelligence Spring 2007

Logical Agents. Administrative. Thursday: Midterm 1, 7p-9p. Next Tuesday: DOW1013: Last name A-M DOW1017: Last name N-Z

Chương 3 Tri th ức và lập luận

Inference Methods In Propositional Logic

Foundations of Artificial Intelligence

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

22c:145 Artificial Intelligence

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

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

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Advanced Topics in LP and FP

Logic: Propositional Logic (Part I)

Logical Agents. Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 7

Logical Agents. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 7

CS:4420 Artificial Intelligence

What is the relationship between number of constraints and number of possible solutions?

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

PROPOSITIONAL CALCULUS

Logic. Stephen G. Ware CSCI 4525 / 5525

Propositional Logic: Methods of Proof (Part II)

Logical agents. Chapter 7. Chapter 7 1

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

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer

Knowledge Based Systems: Logic and Deduction

Logic & Logic Agents Chapter 7 (& Some background)

Propositional logic II.

Transcription:

Artificial Intelligence Propositional logic

Propositional Logic: Syntax Syntax of propositional logic defines allowable sentences Atomic sentences consists of a single proposition symbol Each symbol stands for proposition that can be or False Symbols of propositional logic Propositional symbols: P, Q, Logical constants:, False Making complex sentences Logical connectives of symbols:,,,, Also have parentheses to enclose each sentence: ( ) Sentences will be used for inference/problemsolving 2

Propositional Logic: Syntax, False, S 1, S 2, are sentences If S is a sentence, S is a sentence Not (negation) S 1 S 2 is a sentence, also (S 1 S 2 ) And (conjunction) S 1 S 2 is a sentence Or (disjunction) S 1 S 2 is a sentence Implies (conditional) S 1 S 2 is a sentence Equivalence (biconditional) 3

Propositional Logic: Semantics Semantics defines the rules for determining the truth of a sentence (wrt a particular model) Sis true iff S is false S 1 S 2 S 1 S 2 S 1 S 2 S 1 S 2 is true iff S 1 is true and S 2 is true is true iff S 1 is true or S 2 is true is true iff S 1 is false or S 2 is true (is false iff S 1 is true and S 2 is false) (if S 1 is true, then claiming that S 2 is true, otherwise make no claim) is true iff S 1 S 2 is true and S 2 S 1 is true (S 1 same as S 2 ) 4

Semantics in Truth Table Form P Q P P Q P Q P Q P Q False False False False False False False False False False False False False 5

Propositional Inference: Enumeration Method Truth tables can test for valid sentences under all possible interpretations in all possible worlds For a given sentence, make a truth table Columns as the combinations of propositions in the sentence Rows with all possible truth values for proposition symbols If sentence true in every row, then valid 6

Propositional Inference: Enumeration Method Test ((P H) H ) P P H P H H (P H) H False False False False False False False False False False ((P H) H ) P 7

Practice Test (P H) (P H) 8

Simple Wumpus Knowledge Base For simplicity, only deal with the pits Choose vocabulary Let P i,j be if there is a pit in [i,j] Let B i,j be if there is a breeze in [i,j] KB sentences FACT: There is no pit in [1,1] R 1 : P 1,1 RULE: There is breeze in adjacent neighbor of pit R 2 : B 1,1 (P 1,2 P 2,1 ) Need rule for R 3 : B 2,1 (P 1,1 P 2,2 P 3,1 ) each square! 9

Wumpus Environment Given knowledge base Include percepts as move through environment (online) Need to deduce what to do Derive chains of conclusions that lead to the desired goal Use inference rules α β Inference rule: α derives β Knowing α is true, then β must also be true 10

Inference Rules for Prop. Logic Modus Ponens From implication and premise of implication, can infer conclusion α β, α β 11

Inference Rules for Prop. Logic And-Elimination From conjunction, can infer any of the conjuncts 12

Inference Rules for Prop. Logic And-Introduction From list of sentences, can infer their conjunction 13

Inference Rules for Prop. Logic Or-Introduction From sentence, can infer its disjunction with anything else 14

Inference Rules for Prop. Logic Double-Negation Elimination From doubly negated sentence, can infer a positive sentence αα αα 15

Inference Rules for Prop. Logic Unit Resolution From disjunction, if one of the disjuncts is false, can infer the other is true α β, β α 16

Inference Rules for Prop. Logic Resolution Most difficult because β cannot be both true and false One of the other disjuncts must be true in one of the premises (implication is transitive) α β, β γ α γ Either: ββ OR ββ αα ββ, ββ ββ γγ, ββ OR αα γγ αα OR γγ 17 Valid!

Monotonicity A logic is monotonic if when add new sentences to KB, all sentences entailed by original KB are still entailed by the new larger KB 18

TASK: Find the Wumpus Can we infer that the Wumpus is in cell (1,3), given our percepts and environment rules? A = agent B = breeze 4 = safe square S = stench 3 W! V = visited W = wumpus 2 A S 1 B V V PIT 1 2 3 4 19

Wumpus Knowledge Base Percept sentences (facts) at this point S 1,1 B 1,1 S 2,1 B 2,1 S 1,2 B 1,2 2 A S 1 V V B 1 2 20

Environment Rules R 1 : S 1,1 W 1,1 W 1,2 W 2,1 3 W? 2 A S 1 1 2 3 21

Environment Rules R 2 : S 2,1 W 1,1 W 2,1 W 2,2 W 3,1 3 W? 2 A S 1 1 2 3 22

Environment Rules R 3 : S 1,2 W 1,1 W 1,2 W 2,2 W 1,3 3 W? 2 A S 1 1 2 3 23

Environment Rules R 4 : S 1,2 W 1,3 W 1,2 W 2,2 W 1,1 3 W? 2 A S 1 1 2 3 24

Conclude W 1,3? Does the Wumpus reside in square (1,3)? In other words, can we infer W 1,3 from our knowledge base? 25

Conclude W 1,3 (Step #1) Modus Ponens α β, α β R 1 : S 1,1 W 1,1 W 1,2 W 2,1 Percept: S 1,1 Infer W 1,1 W 1,2 W 2,1 26

Conclude W 1,3 (Step #2) And-Elimination α 1 α 2 α n α i W 1,1 W 1,2 W 2,1 Infer W 1,1 W 1,2 W 2,1 27

Conclude W 1,3 (Step #3) Modus Ponens α β, α β R 2 : S 2,1 W 1,1 W 2,1 W 2,2 W 3,1 Percept: S 2,1 Infer W 1,1 W 2,1 W 2,2 W 3,1 And-Elimination α 1 α 2 α n α i W 1,1 W 2,1 W 2,2 W 3,1 28

Conclude W 1,3 (Step #4) Modus Ponens α β, α β R 4 : S 1,2 W 1,3 W 1,2 W 2,2 W 1,1 Percept: S 1,2 Infer W 1,3 W 1,2 W 2,2 W 1,1 29

Conclude W 1,3 (Step #5) Unit Resolution α β, β α W 1,3 W 1,2 W 2,2 W 1,1 from Step #4 W 1,1 from Step #2 Infer W 1,3 W 1,2 W 2,2 30

Conclude W 1,3 (Step #6) Unit Resolution α β, β α W 1,3 W 1,2 W 2,2 from Step #5 W 2,2 from Step #3 Infer W 1,3 W 1,2 31

Conclude W 1,3 (Step #7) Unit Resolution α β, β α W 1,3 W 1,2 from Step #6 W 1,2 from Step #2 Infer W 1,3 The wumpus is in cell 1,3!!! 32

Wumpus in W 1,3 3 W! 2 A S 1 1 2 3 33

Summary Propositional logic commits to existence of facts about the world being represented Simple syntax and semantics Proof methods Truth table Inference rules Modus Ponens And-Elimination And/Or-Introduction Double-Negation Elimination Unit Resolution Resolution Propositional logic quickly becomes impractical 34