74.419 Artificial Intelligence Knowledge-based Agents Russell and Norvig, Ch. 6, 7.

Slides:



Advertisements
Similar presentations
Russell and Norvig Chapter 7
Advertisements

3/30/00 Agents that Reason Logically by Chris Horn Jiansui Yang Xiaojing Wu.
Knowledge Representation & Reasoning.  Introduction How can we formalize our knowledge about the world so that:  We can reason about it?  We can do.
1 Problem Solving CS 331 Dr M M Awais Representational Methods Formal Methods Propositional Logic Predicate Logic.
CS 460, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
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.
Computing & Information Sciences Kansas State University Lecture 11 of 42 CIS 530 / 730 Artificial Intelligence Lecture 11 of 42 William H. Hsu Department.
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.
Knowledge in intelligent systems So far, we’ve used relatively specialized, naïve agents. How can we build agents that incorporate knowledge and a memory?
Logical Agents Chapter 7.
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Intro to Logic (Reading R&N: Chapter.
INTRODUÇÃO AOS SISTEMAS INTELIGENTES Prof. Dr. Celso A.A. Kaestner PPGEE-CP / UTFPR Agosto de 2011.
LOGICAL AGENTS Yılmaz KILIÇASLAN. Definitions Logical agents are those that can:  form representations of the world,  use a process of inference to.
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 2008.
Rutgers CS440, Fall 2003 Propositional Logic Reading: Ch. 7, AIMA 2 nd Ed. (skip )
Logical Agents Chapter 7 (based on slides from Stuart Russell and Hwee Tou Ng)
Logical Agents. Knowledge bases Knowledge base = set of sentences in a formal language Declarative approach to building an agent (or other system): 
Artificial Intelligence Lecture No. 9 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
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,
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Lecture 10 of 42 William H. Hsu Department.
‘In which we introduce a logic that is sufficent for building knowledge- based agents!’
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part A Knowledge Representation and Reasoning.
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,
1 Problems in AI Problem Formulation Uninformed Search Heuristic Search Adversarial Search (Multi-agents) Knowledge RepresentationKnowledge Representation.
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.
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 CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
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.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 13 –Reasoning with Uncertainty Tuesday –AIMA, Ch. 14.
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents Russell & Norvig Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean)
1 UNIT-3 KNOWLEDGE REPRESENTATION. 2 Agents that reason logically(Logical agents) A Knowledge based Agent The Wumpus world environment Representation,
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.
1 Knowledge Representation Logic and Inference Propositional Logic Vumpus World Knowledge Representation Logic and Inference Propositional Logic Vumpus.
Logical Agents 1. Outline Introduction Knowledge Based agents 2.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Inference : Example 1 How many variables? 3 variables A,B,C How many models? 2 3 = 8 models.
LOGICAL AGENTS CHAPTER 7 AIMA 3. OUTLINE  Knowledge-based agents  Wumpus world  Logic in general - models and entailment  Propositional (Boolean)
CS666 AI P. T. Chung Logic Logical Agents Chapter 7.
Propositional Logic: Logical Agents (Part I)
Knowledge and reasoning – second part
EA C461 – Artificial Intelligence Logical Agent
Artificial Intelli-gence 1: logic agents
Logical Agents Chapter 7 Selected and slightly modified slides from
Logical Agents Reading: Russell’s Chapter 7
Artificial Intelligence: Logic agents
Logical Agents Chapter 7.
Artificial Intelligence
Artificial Intelligence: Logic agents
Knowledge and reasoning – second part
Logical Agents Chapter 7.
Knowledge Representation I (Propositional Logic)
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

Artificial Intelligence Knowledge-based Agents Russell and Norvig, Ch. 6, 7

Knowledge-Based Agents Reflex agents find their way from Arad to Bucharest by dumb luck Chess program calculates legal moves of its king, but doesn’t know that no piece can be on 2 different squares at the same time Knowledge-Based agents combine general knowledge with current percepts to infer hidden aspects of current state prior to selecting actions Crucial in partially observable environments

Outline Knowledge-based agents Wumpus world Logic in general Propositional and first-order logic Inference, validity, equivalence and satisfiability Reasoning patterns Resolution Forward/backward chaining

Knowledge Base Knowledge Base: set of sentences represented in a knowledge representation language; represent assertions about the world. Inference rule: when one ASKs questions of the KB, the answer should follow from what has been TELLed to the KB previously. tellask

Generic KB-Based Agent

Abilities KB agent Agent must be able to: Represent states and actions, Incorporate new percepts Update internal representation of the world Deduce hidden properties of the world Deduce appropriate actions

Description level The KB agent is similar to agents with internal state Agents can be described at different levels Knowledge level What they know, regardless of the actual implementation. (Declarative description) Implementation level Data structures in KB and algorithms that manipulate them e.g propositional logic and resolution.

The Wumpus World Wumpus

Wumpus World PEAS Description Performance measure gold +1000, death per step, -10 for using the arrow Environment Squares adjacent to Wumpus are smelly Squares adjacent to Pit are breezy Glitter iff Gold is in the same square Shooting kills Wumpus if you are facing it Shooting uses up the only Arrow Grabbing picks up Gold if in same square Releasing drops the Gold in same square Sensors: Stench, Breeze, Glitter, Bump, Scream Actuators: Left turn, Right turn, Forward, Grab, Release, Shoot

Wumpus World Characterization Observable? Deterministic? Episodic? Static? Discrete? Single-agent?

Wumpus World Characterization Observable? No, only local perception. Deterministic? Episodic? Static? Discrete? Single-agent?

Wumpus World Characterization Observable? No, only local perception Deterministic? Yes, outcome exactly specified. Episodic? Static? Discrete? Single-agent?

Wumpus World Characterization Observable? No, only local perception. Deterministic? Yes, outcome exactly specified. Episodic? No, sequential at the level of actions. Static? Discrete? Single-agent?

Wumpus World Characterization Observable? No, only local perception. Deterministic? Yes, outcome exactly specified. Episodic? No, sequential at the level of actions. Static? Yes, Wumpus and Pits do not move. Discrete? Single-agent?

Wumpus World Characterization Observable? No, only local perception. Deterministic? Yes, outcome exactly specified. Episodic? No, sequential at the level of actions. Static? Yes, Wumpus and Pits do not move. Discrete? Yes. Single-agent?

Wumpus World Characterization Observable? No, only local perception. Deterministic? Yes, outcome exactly specified. Episodic? No, sequential at the level of actions. Static? Yes, Wumpus and Pits do not move. Discrete? Yes. Single-agent? Yes, Wumpus is essentially a natural feature.

Exploring the Wumpus World The KB initially contains only the rules of the environment. The Agent is in cell [1,1]. The first percept is [none, none,none,none,none]. Move to safe cell, e.g. [2,1].

Exploring the Wumpus World Agent is in cell [2,1]. The agent perceives a Breeze: [none, breeze, none, none, none]. A Breeze in [2,1] indicates that there is a Pit in [2,2] or in [3,1]. Thus, neither [2,2] nor [3,1] are safe to move to. Return to [1,1] to find other, safe cell to move to.

Exploring the Wumpus World Agent is in [1,2]. Perceives a Stench in cell [1,2]. This means that a Wumpus is in [1,1], [1,3] or [2,2]. YET … not in [1,1] - has been visited already. YET … not in [2,2] or stench would have been detected in [2,1]. THUS … Wumpus must be in [1,3]. No breeze in [1,2]. THUS [2,2] is safe. Breeze in [2,1] but no Pit in [2,2] THUS Pit in [3,1]. Move to next safe cell [2,2]. From [2,2] move to [2,3].

Exploring the Wumpus World From [2,2] moved to [2,3]. In [2,3] Agent detects Glitter, Smell, Breeze. Perceive Glitter, THUS pick up Gold. Perceive Breeze, THUS Pit in [3,3] or [2,4] (cannot be in [2,2]). Move back to safe [2,2]. Then to safe [2,1] or [1,2]. Then to start in [1,1] and leave cave with Gold.

What is a logic? A formal language Syntax – what expressions are legal (well- formed) Semantics – what legal expressions mean In logic: the truth of each sentence with respect to each possible world (interpretation!). E.g the language of arithmetic X+2 >= y is a sentence, x2+y is not a sentence X+2 >= y is true in a world where x=7 and y =1 X+2 >= y is false in a world where x=0 and y =6

Entailment One thing follows from another KB |=  KB entails sentence  if and only if  is true in all worlds, where KB is true. E.g. x+y=4 entails 4=x+y Entailment is a relationship between sentences that is based on semantics.

Models Logicians typically think in terms of models, which are formally structured worlds (domain, universe, relational structure) with respect to which truth can be evaluated. m is a model of a sentence , if  is true in m. M(  ) is the set of all models of .

Wumpus world model

Logical inference The notion of entailment can be used for logic inference. Model checking (see Wumpus example): enumerate all possible models and check whether  is true. If an algorithm only derives entailed sentences it is called sound or thruth preserving. 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 

Schematic perspective If KB is true in the real world, then any sentence  derived from KB by a sound inference procedure is also true in the real world.