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

Similar documents
Logical Agents. Outline

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

Intelligent Agents. Pınar Yolum Utrecht University

Class Assignment Strategies

Logical Agents. Chapter 7

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Propositional Logic: Logical Agents (Part I)

Logical Agent & Propositional Logic

Introduction to Artificial Intelligence. Logical Agents

Logic. proof and truth syntacs and semantics. Peter Antal

Kecerdasan Buatan M. Ali Fauzi

Artificial Intelligence Chapter 7: Logical Agents

Logical Agent & Propositional Logic

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

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

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

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

CS:4420 Artificial Intelligence

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

Propositional Logic: Logical Agents (Part I)

Proof Methods for Propositional Logic

Logical agents. Chapter 7. Chapter 7 1

TDT4136 Logic and Reasoning Systems

CS 771 Artificial Intelligence. Propositional Logic

CS 188: Artificial Intelligence Spring 2007

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

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

Logical Agents. Chapter 7

Logical Agents. Outline

Artificial Intelligence

Logic & Logic Agents Chapter 7 (& background)

Logic & Logic Agents Chapter 7 (& Some background)

Introduction to Intelligent Systems

Logical Agents: Propositional Logic. Chapter 7

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

Artificial Intelligence. Propositional logic

Artificial Intelligence

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

Introduction to Intelligent Systems

Logical Agents (I) Instructor: Tsung-Che Chiang

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

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

CS 4700: Foundations of Artificial Intelligence

Knowledge- Based Agents. Logical Agents. Knowledge Base. Knowledge- Based Agents 10/7/09

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

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

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

Logical Agents. Santa Clara University

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

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

Foundations of Artificial Intelligence

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

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

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

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

Lecture 7: Logical Agents and Propositional Logic

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

Lecture 6: Knowledge 1

Lecture 7: Logic and Planning

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

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

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

CS 380: ARTIFICIAL INTELLIGENCE

Introduction to Arti Intelligence

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

Adversarial Search & Logic and Reasoning

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

CS 7180: Behavioral Modeling and Decision- making in AI

Agents that reason logically

CS 4700: Artificial Intelligence

Pengju XJTU 2016

Logic: Propositional Logic (Part I)

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

AI Programming CS S-09 Knowledge Representation

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

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

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

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

Logic. Stephen G. Ware CSCI 4525 / 5525

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Logical Agents. September 14, 2004

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

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

Logical agents. Chapter 7. Chapter 7 1

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

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

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

Logical Agents. Seung-Hoon Na Chonbuk National University. 1 Department of Computer Science

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

Artificial Intelligence

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

Artificial Intelligence

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

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II)

Knowledge Based Systems: Logic and Deduction

Knowledge based Agents

Transcription:

0/0/4 Knowledge based agents Logical Agents Agents need to be able to: Store information about their environment Update and reason about that information Russell and Norvig, chapter 7 Knowledge based agents Agents need to be able to: Store information about their environment Update and reason about that information To achieve that we will introduce: A knowledge base (KB): a list of facts that are known to the agent. Rules to infer new facts from old facts using rules of inference. Knowledge based agents Agents need to be able to: Store information about their environment Update and reason about that information To achieve that we will introduce: A knowledge base (KB): a list of facts that are known to the agent. Rules to infer new facts from old facts using rules of inference. Logic provides the natural language for this. 3 4 Knowledge Bases The Wumpus World Knowledge base: q set of sentences in a formal language. Declarative approach to building an agent: q Tell it what it needs to know. q Ask it what to do à answers should follow from the KB. 5 6

0/0/4 The Wumpus World The Wumpus World Environment Performance measure q gold: +000, death: -000 q - per step, -0 for using the arrow Environment q Squares adjacent to wumpus: smelly q Squares adjacent to pit: breezy q Glitter iff gold is in the same square q Shooting kills wumpus if you are facing it q Shooting uses up the only arrow q Grabbing picks up gold if in same square Sensors: Stench,, Glitter, Bump Actuators: Left turn, Right turn, Forward, Grab, Release,Shoot Fully Observable? No, only local perception Deterministic? Yes, outcome exactly specified Static? Yes, Wumpus and pits do not move Discrete? Yes Single-agent? Yes 7 8,4,4 3,4 4,4,3,3 3,3 4,3,, 3, 4, A = Agent B = G = Glitter, Gold = Safe square A = Agent B = G = Glitter, Gold = Safe square,4,4 3,4 4,4,3,3 3,3 4,3,, 3, 4, P?,, 3, 4, A,, 3, 4, A P? V B (b) Initial state (a) After move s are next to pits. Which is the pit? 9 0 After 3 moves Stench here Means Wumpus here,4,4 3,4 4,4,3,3 3,3 4,3 W!,, 3, 4, A S,, 3, 4, B P! V V A = Agent B = G = Glitter, Gold = Safe square After 5 moves A B G = Agent = = Glitter, Gold = Safe square Found gold, Avoided Wumpus,4,4 3,4 4,4 P?,3,3 3,3 4,3 W! A P? S G B,, 3, 4, S V V,, 3, 4, B P! V V (a) (b)

0/0/4 Logic We used logical reasoning to find the gold. Formal language for representing information such that conclusions can be drawn Syntax defines the sentences in the language Semantics define the "meaning" of sentences; q i.e., define truth of a sentence in a world Logic Syntax defines the sentences in the language Semantics define the "meaning" of sentences; q i.e., define truth of a sentence in a world E.g., the language of arithmetic q Syntax: x+ y is a sentence; x+y > {} is not a sentence q Semantics: x+ y is true in a world where x = 7, y = 3 4 Entailment Entailment means that one thing follows from another: KB α Knowledge base KB entails sentence α if and only if α is true in all worlds where KB is true Models Model: a formally structured world with respect to which truth can be evaluated q Example: a model for x+y=4 is an assignment of values to x and y q It is true in a world where x is and y is q Example: in a knowledgebase of arithmetic x+y = 4 entails 4 = x+y 5 6 Entailment in the wumpus world Wumpus models Let s consider possible models for wumpus KB, restricting our attention to pits, and focusing on a region of the wumpus world. Situation after: nothing in [,], moving right, breeze in [,] All possible models 7 8 3

3 3 3 3 3 3 3 3 0/0/4 KB α α = no pit in [,] KB = all possible wumpus-worlds consistent with the observations and behavior of Wumpus world. KB α can be proved by model checking α = no pit in [,]", KB α 9 0 Logical inference The notion of entailment can be used for logic inference. q Model checking: check all possible models q Is this a good inference method? KB i α - sentence α can be derived from KB by procedure i If an algorithm only derives entailed sentences it is called sound or truth preserving. q Otherwise it just makes things up. i is sound if whenever KB i α it is also true that KB α Completeness: the algorithm can derive any sentence that is entailed. i is complete if whenever KB α it is also true that KB i α Logic Needed: Representation: formalism for storing knowledge. Reasoning: mechanism for deriving new knowledge from old: deduction Propositional logic Propositional logic is a simple logic based on propositions: q Propositions are either true or false Examples of propositions q Your textbook is green q The sky is falling Propositional logic Propositions: statements of fact q It is raining becomes raining Connectives: operators on propositions q If it is raining, then it is not sunny. becomes raining sunny 3 4 4

0/0/4 Propositional logic: Syntax The proposition symbols P, P etc are sentences If S is a sentence, S is a sentence (negation) If S and S are sentences, S S is a sentence (conjunction) If S and S are sentences, S S is a sentence (disjunction) If S and S are sentences, S S is a sentence (implication) If S and S are sentences, S S is a sentence (biconditional) Truth Values This sentence S S is true S S is false is true when (iff) (S ^ S ) S is true and S is true (S v S ) At least one of S or S is true (S S ) S is false or S is true (S S ) S & S have the same truth value 5 6 Truth tables for connectives Evaluating truth value Simple recursive process evaluates an arbitrary sentence, e.g., P, (P, P 3, ) = true (true false) = true true = true OR: P or Q is true or both are true. XOR: P or Q is true but not both. Implication is always true when the premises are False! 7 8 Question Does {A B, B} entail {A}? q Written as {A B, B} {A} q How do you know if this is true? A B (A B)^B A T T T T T F F T F T T F F F F F No, {A} is not entailed Wumpus world sentences Let P i,j be true if there is a pit in [i, j]. Let B i,j be true if there is a breeze in [i, j]. start: P, B, "Pits cause breezes in adjacent squares" B, (P, P, ) B, (P, P, P 3, ) 30 5

0/0/4 Truth tables for inference Inference by enumeration Enumeration of all models is sound and complete. For n symbols, time complexity is O( n ). Need a smarter way to do inference! 3 3 6