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

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

Intelligent Agents. Pınar Yolum Utrecht University

Logical Agents. Outline

Logical Agents. Chapter 7

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Introduction to Artificial Intelligence. Logical Agents

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

Propositional Logic: Logical Agents (Part I)

Logical Agent & Propositional Logic

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

Logical Agent & Propositional Logic

Class Assignment Strategies

Artificial Intelligence. Propositional logic

Artificial Intelligence Chapter 7: Logical Agents

CS 188: Artificial Intelligence Spring 2007

Lecture 7: Logic and Planning

Logical Agents (I) Instructor: Tsung-Che Chiang

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

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

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

Logic. proof and truth syntacs and semantics. Peter Antal

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Kecerdasan Buatan M. Ali Fauzi

CS 771 Artificial Intelligence. Propositional Logic

TDT4136 Logic and Reasoning Systems

Logical agents. Chapter 7. Chapter 7 1

Artificial Intelligence

Artificial Intelligence

Propositional Logic: Logical Agents (Part I)

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

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

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

Proof Methods for Propositional Logic

Introduction to Intelligent Systems

Logical Agents: Propositional Logic. Chapter 7

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

Introduction to Intelligent Systems

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

Logical Agents. Outline

Logic: Propositional Logic (Part I)

Lecture 7: Logical Agents and Propositional Logic

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

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

CS:4420 Artificial Intelligence

Logical Agents. Chapter 7

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

CS 4700: Foundations of Artificial Intelligence

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. Santa Clara University

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

CS 380: ARTIFICIAL INTELLIGENCE

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

CS 380: ARTIFICIAL INTELLIGENCE LOGICAL AGENTS. Santiago Ontañón

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Logic & Logic Agents Chapter 7 (& background)

Foundations of Artificial Intelligence

Lecture 6: Knowledge 1

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

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

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

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

CS 7180: Behavioral Modeling and Decision- making in AI

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

CS:4420 Artificial Intelligence

Propositional Logic: Methods of Proof (Part II)

Advanced Topics in LP and FP

Knowledge based Agents

Adversarial Search & Logic and Reasoning

Agents that reason logically

AI Programming CS S-09 Knowledge Representation

Logic & Logic Agents Chapter 7 (& Some background)

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

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

A simple knowledge-based agent. Logical agents. Outline. Wumpus World PEAS description. Wumpus world characterization. Knowledge bases.

Propositional Logic: Methods of Proof (Part II)

Inference in Propositional Logic

CS 4700: Artificial Intelligence

Logical agents. Chapter 7. Chapter 7 1

Inference Methods In Propositional Logic

Outline. Logic. Knowledge bases. Wumpus world characteriza/on. Wumpus World PEAS descrip/on. A simple knowledge- based agent

Logical Agents. September 14, 2004

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

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

Inference Methods In Propositional Logic

Propositional Logic: Review

Rational Agents. Paolo Turrini. Introduction to Artificial Intelligence 2nd Part. Department of Computing, Imperial College London

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

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

22c:145 Artificial Intelligence

Logic. Stephen G. Ware CSCI 4525 / 5525

Deductive Systems. Lecture - 3

Natural Deduction for Propositional Logic

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

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

First Order Logic (FOL)

Propositional Logic: Methods of Proof (Part II)

Transcription:

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

Last Lecture Games Cont. α-β pruning Outline Games with chance, e.g. Backgammon Logical Agents and thewumpus World This Lecture Introduction to Logic MP1 Assigned Chapter 6 Reading

Minimax Example Game tree for a fictitious 2-ply game MAX 3 = max(3,2,2) MIN A 1 3 = min(3,12,8) A 2 A 3 2 2 A 1,2 A 1.3 3 12 8 2 4 6 14 5 2 Leaf nodes: value of utility function

Resource limits Suppose we have 100 seconds, explore 10 4 nodes/second 10 6 nodes per move Standard approach: cutoff test e.g., depth limit evaluation function = estimated desirability of position (an approximation to the utility used in minimax).

α β Pruning Example MAX 3 =3 =2 MIN =3 2 14 5 3 12 8 2 X X 14 5 2

Nondeterministic games 1. For mind node, compute min of children 2. For chance node, compute weighted average of children 3. For max node, compute max of children 3

Knowledge bases Inference Engine Knowledge Base Domain-independent knowledge Domain-specific content Knowledge base = set of sentences in a formal language Declarative approach to building an agent or other system: Tell it what it needs to know Alternative is learning approach, but we ll do this later Answers should follow from the KB Agents or systems can be viewed at the knowledge level i.e., what they know, regardless of how implemented Or at the implementation level i.e., data structures in KB and algorithms that manipulate them

Introducing THE WUMPUS

The Wumpus World Goals: Get gold back to the start without entering it or wumpus square Percepts: Breeze, Glitter, Smell Actions: Left turn, Right turn, Forward, Grab, Release, Shoot Environment Squares adjacent to wumpus are smelly Squares adjacent to pit are breezy Glitter if and only if gold is in the same square Shooting kills the wumpus if you are facing it Shooting uses up the only arrow Grabbing picks up the gold if in the same square Releasing drops the gold in the same square

Logic in general Logics are 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., define truth of a sentence in a world E.g., the language of arithmetic x + 2 y is a sentence x + y > is not a sentence x + 2 y is true iff the number x+2 is no less than 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

Types of logic Logics are characterized by what they commit to as ``primitives'' Ontological commitment: what exists - facts? objects? time? beliefs? Epistemological commitment: what states of knowledge? Language Propositional Logic First order logic Temporal logic Probability theory Facts Facts Ontological Commitment Facts, objects, relations Facts, objects, relations, time Epistemological Commitment /false/unknown /false/unknown /false/unknown Degree of belief 0 1 Fuzzy logic Degree of truth Degree of belief 0 1

Logical Representation World Entailment Sentences KB Semantics Facts Entail Follows Sentences α Semantics Facts A knowledge base is a collection of sentences An entailed sentence is true, given that the old sentences in the knowledge base are true.

Inference A knowledge base is a collection of sentences Knowledge base KB entails sentence α if and only if α is true whenever KB is true (i.e. all sentences in KB are true) An inference procedure i can do two things: Given KB, generate new sentence α purported to be entailed by KB Given KB and α, report whether or not α is entailed by KB. A sound inference procedure only produces entailed sentences Every entailed sentence can be generated by a complete inference procedure

Propositional logic: Syntax Propositional logic is the simplest logic Logical constants TRUE and FALSE are sentences Proposition symbols P1, P2 etc are sentences Symbols P1 and negated symbols P1 are called literals If S is a sentence, S is a sentence (NOT) If S1 and S2 is a sentence, S1 S2 is a sentence (AND) If S1 and S2 is a sentence, S1 S2 is a sentence (OR) If S1 and S2 is a sentence, S1 S2 is a sentence (Implies) If S1 and S2 is a sentence, S1 S2 is a sentence (Equivalent)

Order of Precedence From highest to lowest: parenthesis ( Sentence ) NOT AND OR Implies Equivalent

Propositional logic: Semantics Truth Table Implication: P Q If P is true, then Q is true; otherwise I m making no claims about the truth of Q. P Q is equivalent to Ρ Q

Propositional Logic: Proof methods Model checking Truth table enumeration (sound and complete for propositional logic) Application of inference rules Legitimate (sound) generation of new sentences from old Proof = a sequence of inference rule applications Can use inference rules as operators in a standard search algorithm

Propositional Inference: Enumeration Method Let α=α Β and KB = (Α C) (B C) Is it the case that KB α? I.e., α is true in all worlds where KB is true Check all possible models -- α must be true whenever KB is true A B KB (Α C) (B C) C α Α Β

Propositional Inference: Enumeration Method Let α=α Β and KB = (Α C) (B C) Is it the case that KB α? I.e., α is true in all worlds where KB is true Check all possible models -- α must be true whenever KB is true A B KB (Α C) (B C) C α Α Β

Propositional Inference: Enumeration Method Let α=α Β and KB = (Α C) (B C) Is it the case that KB α? Check all possible models -- α must be true whenever KB is true A B C KB (Α C) ( B C) α Α Β

Propositional Inference: Enumeration Method Let α=α Β and KB = (Α C) (B C) Is it the case that KB α? Check all possible models -- α must be true whenever KB is true A B C KB (Α C) ( B C) α Α Β

Propositional Inference: Enumeration Method Let α=α Β and KB = (Α C) (B C) Is it the case that KB α? Check all possible models -- α must be true whenever KB is true A B KB C KB (Α C) ( B C) α α Α Β

Proof methods Model checking Truth table enumeration (sound and complete for propositional logic) Application of inference rules Legitimate (sound) generation of new sentences from old Proof = a sequence of inference rule applications Can use inference rules as operators in a standard search algorithm

Normal forms Approaches to inference use syntactic operations on sentences, often expressed in standardized forms Conjunctive Normal Form (CNF universal) Conjunction of disjunctions of literals e.g. (A Β) (Β Ε Η) Disjunctive Normal Form (DNF universal) Disjunction of conjunction of literals e.g. Α (Α Β) (Η Μ Ν Α) (Α Β Η) Horn Form (restricted) Conjunction of Horn clauses (clauses w/ 1 positive literal) e.g. (Α Β) (Β C D) Often written as a set of implications B Α and (C D) B

Inference rules An inference rule is sound if the conclusion is true in all cases where the premises are true α β Premise Conclusion

An Inference Rule: Modus Ponens From an implication and the premise of the implication, you can infer the conclusion α β, α Premise β Conclusion An inference rule is sound if the conclusion is true in all cases where the premises are true

An Inference Rule: And - Elimination From a conjunction, you can infer any of conjuncts α 1 α 2 α n α i Premise Conclusion An inference rule is sound if the conclusion is true in all cases where the premises are true

And-Introduction & Double Negation And-Introduction α 1, α 2,, α n α 1 α 2 α n Premise Conclusion Double Negation α α Premise Conclusion