Logical Agents. September 14, 2004

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

Artificial Intelligence. Propositional logic

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

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

Artificial Intelligence Chapter 7: Logical Agents

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

Intelligent Agents. Pınar Yolum Utrecht University

Artificial Intelligence Knowledge Representation I

Knowledge based Agents

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

CS 380: ARTIFICIAL INTELLIGENCE

Logical agents. Chapter 7. Chapter 7 1

Logical Agents: Propositional Logic. Chapter 7

Logical agents. Chapter 7. Chapter 7 1

Logical Agents. Chapter 7

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

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

Logical Agents. Outline

Foundations of Artificial Intelligence

Propositional Logic: Review

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Foundations of Artificial Intelligence

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Agents that reason logically

Logical Agent & Propositional Logic

Logic for Computer Science - Week 4 Natural Deduction

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

Logical Agent & Propositional Logic

Advanced Topics in LP and FP

TDT4136 Logic and Reasoning Systems

Logical Agents (I) Instructor: Tsung-Che Chiang

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

Inference Methods In Propositional Logic

Introduction to Intelligent Systems

Introduction to Intelligent Systems

Foundations of Artificial Intelligence

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

Inference in Propositional Logic

Knowledge Representation. Propositional logic

Introduction to Artificial Intelligence. Logical Agents

Propositional logic II.

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

KB Agents and Propositional Logic

CS 7180: Behavioral Modeling and Decision- making in AI

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

Learning Goals of CS245 Logic and Computation

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

Class Assignment Strategies

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

Inference Methods In Propositional Logic

Propositional Logic: Part II - Syntax & Proofs 0-0

Knowledge Representation. Propositional logic.

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

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

Kecerdasan Buatan M. Ali Fauzi

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.

Lecture 6: Knowledge 1

CS 771 Artificial Intelligence. Propositional Logic

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

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

Propositional Logic: Methods of Proof (Part II)

CS 4700: Foundations of Artificial Intelligence

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

Propositional Logic: Logical Agents (Part I)

Language of Propositional Logic

02 Propositional Logic

Logic. proof and truth syntacs and semantics. Peter Antal

Artificial Intelligence

Propositional Logic. Spring Propositional Logic Spring / 32

Logic: Propositional Logic (Part I)

Logical Agents. Santa Clara University

a. ~p : if p is T, then ~p is F, and vice versa

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

Deliberative Agents Knowledge Representation I. Deliberative Agents

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

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

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

Propositional Logic: Models and Proofs

Proof Methods for Propositional Logic

Propositional Logic. Fall () Propositional Logic Fall / 30

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

Natural Deduction for Propositional Logic

03 Propositional Logic II

22c:145 Artificial Intelligence

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

Artificial Intelligence

Logical Agents. Chapter 7

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Logic and Inferences

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

CS:4420 Artificial Intelligence

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

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

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

Propositional Logic: Methods of Proof (Part II)

Transcription:

Logical Agents September 14, 2004 The aim of AI is to develop intelligent agents that can reason about actions and their effects and about the environment, create plans to achieve a goal, execute the plans, observe the changes, and change the course of actions if necessary to attain or maintain a goal. To achieve this goal machines need knowledge and the capability to reason with it. Until machines can acquire knowledge by themselves, we need to feed them with knowledge and teach them how to reason with the knowledge. Thus, we need to be able to represent knowledge of interest to the agent such as information about the environment information about its actions (capability) and provide it a means to reason with this knowledge. One could argue that natural language (for instance, English) could be used for representing knowledge and our commonsense reasoning could do the job helping the agents in reasoning. As machines are still far from understanding natural language, this will be the dream of mankind for years to come. Furthermore, no formal theory has been proved to be able to capture commonsense reasoning in full. This forces us to resort to a formal language that computers can understand in full and the reasoning process can be carried out in such a language. This constitutes a logic. Propositional logic is perhaps the simplest logic ever developed. 1 Knowledge-Based Agents The components of a knowledge-based agent are its knowledge base (KB) and an inference engine that can be used to derive answer(s) to questions posed to the KB (ASK) or to add new knowledge into the KB (TELL). The agent, with its KB and inference engine, will decide upon what to do, given its perception about the world. The main loop for this agent is function KB-Agent(percept) return an action static KB - the knowledge base t - the time moment TELL(KB,Make-Percept-Sentence(percept, t) action <- ASK(KB, Make-Action-Query(t)) 1

TELL(KB,Make-Action-Sentence(action, t) t <- t+1 return action 2 Propositional Logic 2.1 Syntax Describe how to construct sentences. Definition 1 (Alphabet) An alphabet of a propositional logic theory (or propositional theory, for short) is a set of symbols consisting of: proposition symbols: like P, Q etc. each represent a proposition, constant symbols: T rue and F alse logical connectives:,,,,, and parentheses (, ). While the first item will change from theory to theory, the last two items will be the same for every propositional theory. Instead of proposition symbols and constant symbols we will shorten to propositions and constants, respectively, if no confusion is possible. Definition 2 (Sentence) Given an alphabet, a sentence is defined as follows. Each constant symbol (T rue or F alse) is an atomic sentence. Each proposition symbol is an atomic sentence. If P, Q are sentence then so does P Q, P Q, P Q, P Q, P. This sentences are called non-atomic sentences. If P is an atomic sentence then (P ) is an atomic sentence. If P is a non-atomic sentence then (P ) is also a non-atomic sentence. Name Symbol Example Name of part Conjunction/And P Q P, Q - conjuncts Disjunction/Or P Q P, Q - disjuncts Implication P Q P - premises, Q - conclusion P - antecedent, Q - consequent Equivalence (P Q) (Q P ) - Negation P - Example 1 Some atomic propositions: P (This can represents the fact Every student works hard ) 2

Q (This can represents the fact Tom is a student ) R (This can represents the fact Tom works hard ) Some non-atomic sentences: (P Q) S (This could be understood as the implication: Every student works hard and Tom is a student implies Tom works hard ) (P Q) ( S) ( Every student works hard and Tom is a student implies Tom does not work hard ) Definition 3 A theory is a set of sentences. 2.2 Semantics Specify how sentences relate to states of affair. (The meaning of sentences in the world that is described by the propositions). This is done by specifying the interpretation of the symbols belonging to the alphabet. Definition 4 (Interpretation) An interpretation I of an alphabet is a mapping from its set of proposition symbols to the set of truth values {T rue, F alse}, i.e., for each symbol P, I(P ) = T rue or I(P ) = F alse. In every interpretation I of T, the logical constant T rue and F alse is assigned the truth value T rue and F alse, respectively. Definition 5 (Truth Value of Sentences) Given an alphabet and I be an interpretation of it. The truth value of a non-atomic sentence S is defined using the following rules: S = P Q, I(S) is T rue if I(P ) = I(Q) = T rue; otherwise, I(S) = F alse. S = P Q, I(S) is T rue if I(P ) = T rue or I(Q) = T rue; otherwise, I(S) = F alse. S = P Q, I(S) is T rue if I(P ) = I(Q); otherwise, I(S) = F alse. S = P Q, I(S) is T rue if I(P ) = F alse or I(Q) = T rue; otherwise, I(S) = F alse. S = P, I(S) is T rue if I(P ) = F alse; otherwise, I(S) = F alse. We say that S is true with respect to I if I(S) = T rue. The truth value of a sentence can also be determined using the following table. P Q P Q P Q P Q P Q P True True True True True True False True False False True False False False False True False True False True True False False False False True True True 3

2.3 Model, Validity, and Entailment Given a theory T and an interpretation I. Definition 6 (Model - Satisfiability) An interpretation I is a model of T if I(s) = T rue for every sentence s T. T is satisfiable if T has a model. Definition 7 (Validity) A sentence S over an alphabet A is valid if S is true with respect to every possible interpretation I of A. Definition 8 (Entailment) A sentence S is entailed by a theory T, denoted by T = S if every model M of T is also a model of S. Naive algorithm for checking satisfiability of T. Enumerate all possible interpretations, check one-by-one if any interpretation is a model of T. If one is, return Yes ; if none is, return No. Modify the above algorithm for checking entailment? NOTE. it). A theory could be viewed as a sentence (a conjunction of all the sentences belonging to 2.4 Inference rules for propositional logic An inference rule is of the form β says that the sentence β can be derived from a sentence denoted by β. It is established to make the inference process easier. Following are inference rules for propositional logic. Modus Ponens And-Elimination And-Introduction Or-Introduction β, β β β, β β β 4

Double-Negation Elimination Unit Resolution Resolution β, β β, β γ γ 2.5 Basic Definitions and Problems in Propositional Logic Given a theory T and a sentence S. Satisfiability Problem. Does T has a model? Entailment Problem. Determining whether T entails S (or T = S)? This allows us to generate new True sentences (e.g. S) from the old True sentences (e.g. sentences of T ) Inference Procedure. A procedure that, given a theory T, generates new sentences that are entailed by T ; or answers the query whether T = S for every sentence S. An inference procedure is sound if it generates only entailed sentences. A sequence of operations (or inference rules) that is used by a sound inference procedure of T in showing that T = S is called a proof of S (wrt. T ). An inference procedure is complete if it can find a proof for any sentence that is entailed by the theory. Complexity. Satisfiability is NP-complete. Entailment is co-np complete. Example 2 Checking the validity of a sentence: Using truth table: P (Q R) (P Q) R P Q R P Q Q R P (Q R) (P Q) R T T T T T T T T T F T F F F T F T F F F F T F F F F F F F T T F T F F F T F F F F F F F T F F F F F F F F F F F 5

Observe that whenever left-hand-side (LHS) is true, so is right-hand-side (RHS) and whenever LHS is false, so is RHS (and vice versa). So, LHS RHS. Using inference rules: P (Q R) P Q R Q and and P (Q R) Q R Q R R (And-Elimination) (1) (And-Elimination) (2) (1) and (2) imply that P, Q, and R can be derived from P (Q R). (3) P, Q (P Q) (And-Introduction) (4) (1)-(5) show that Similarly, we can show that (P Q), R (P Q) R The last two implications show the equivalence. (And-Introduction) (5) P (Q R) (P Q) R (P Q) R P (Q R) 6