A toy world for logical exploration The Wumpus example.

Slides:



Advertisements
Similar presentations
Knowledge Representation using First-Order Logic
Advertisements

First-Order Logic Chapter 8.
Russell and Norvig Chapter 7
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
3/30/00 Agents that Reason Logically by Chris Horn Jiansui Yang Xiaojing Wu.
Artificial Intelligence Knowledge-based Agents Russell and Norvig, Ch. 6, 7.
Knowledge Representation & Reasoning.  Introduction How can we formalize our knowledge about the world so that:  We can reason about it?  We can do.
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.
1 Problem Solving CS 331 Dr M M Awais Representational Methods Formal Methods Propositional Logic Predicate Logic.
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.
© Franz Kurfess Lab Exercise Reasoning CSC 480: Artificial Intelligence Wumpus World Lab Dr. Franz J. Kurfess Computer Science Department Cal Poly.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 8 Jim Martin.
Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian1 Reasoning/Inference  Given a set of facts/beliefs/rules/evidence.
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
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.
Agents that Reason Logically Logical agents have knowledge base, from which they draw conclusions TELL: provide new facts to agent ASK: decide on appropriate.
Perpetual Self-aware Cognitive Agents Michael T. Cox BBNT Cambridge.
Logical Agents Chapter 7 (based on slides from Stuart Russell and Hwee Tou Ng)
Artificial Intelligence Lecture No. 9 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
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.
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.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
1 CMSC 471 Fall 2002 Class #9– Monday, Sept Knowledge Representation Chapter Some material adopted from notes by Andreas Geyer-Schulz and.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.
1 Knowledge Representation Propositional Logic Vumpus World Knowledge Representation Propositional Logic Vumpus World.
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.
For Friday Read chapter 8 Homework: –Chapter 7, exercise 1.
Knowledge-based agents: they keep track of the world by means of an internal state which is constantly updated by the agent itself A Knowledge-Based Agent.
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
1 First-Order Logic Propositional logic does not represent and cannot handle objects. First-order logic is to represent and reason on objects and their.
For Wednesday Read chapter 9, sections 1-4 Homework: –Chapter 8, exercise 6 May be done in groups.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 13 –Reasoning with Uncertainty Tuesday –AIMA, Ch. 14.
1 Propositional logic (cont…) 命題論理 Syntax&Semantics of first-order logic 構文論と意味論 Deducing hidden properties Describing actions Propositional logic (cont…)
Wumpus World 1 Wumpus and 1 pile of gold in a pit-filled cave Starts in [1,1] facing right - Random cave Percepts: [smell, breeze, gold, bump, scream]
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September.
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 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.
Prof. Dr. Samy Abu Naser University of Palestine Artificial Intelligence.
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)
Propositional Logic: Logical Agents (Part I)
Propositional Logic.
EA C461 – Artificial Intelligence Logical Agent
Learning and Knowledge Acquisition
Logical Agents Chapter 7.
Artificial Intelligence
Class #9– Thursday, September 29
Logical Agents Chapter 7.
EA C461 – Artificial Intelligence Logical Agent
CS 416 Artificial Intelligence
Artificial Intelligence Lecture 10: Logical Agents
Knowledge Representation I (Propositional Logic)
CMSC 471 Fall 2011 Class #10 Tuesday, October 4 Knowledge-Based Agents
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

A toy world for logical exploration The Wumpus example

D. Goforth, fall Wumpus world  A four by four cave with locations identified by coordinates (3,4), etc.  Agent is at a location, facing a particular direction (L,R,D,U) Agent starts at (1,1) facing R >

D. Goforth, fall Wumpus world  In the cave is: A wumpus that smells  It can kill the agent if at same location  It can be killed by the agent shooting an arrow if facing the wumpus. When the wumpus dies, it SCREAMs ^

D. Goforth, fall Wumpus world  In the cave are: 3 Pits. Breezes blow from pits.  If an agent steps into a pit, it falls to its death. A heap of gold that glitters ^

D. Goforth, fall Wumpus world  Agent goal: get gold and get out alive  Agent actions: Move forward one square in current direction (Fwd) Turn left or right 90 o (TL,TR) Shoot arrow in current direction Grab gold  Agent perceptions at each location: [Stench, Breeze, Glitter, Bump, Scream]

D. Goforth, fall Wumpus world  Cave is created randomly (location of wumpus, pits and gold)  Perception / action loop  Agent must construct a model – knowledge base about the cave – as it tries to achieve its goal >

D. Goforth, fall Wumpus world knowledge  General knowledge (known at start) Location and direction Living Grab and holding Wumpus and stench, shooting, scream, life Pits and breeze Gold and glitter Movement and location, direction and bumps Starting state of agent Goal  Facts (not known) Location of wumpus, pits, gold

D. Goforth, fall Wumpus world in propositional logic  Facts are propositions: e.g., W 44 “Wumpus is at square (4,4) 96 propositions (16 each for wumpus, stench, pit, breeze, gold, glitter) to represent a particular cave  General knowledge in sentences: e.g., W 44  (S 44  S 43  S 34 ) “if the wumpus is at (4,4), there is stench at (4,4), (4,3) and (3,4)” “many” sentences

D. Goforth, fall Wumpus world in propositional logic  Facts that may change: Location of agent, direction of agent Agent holding gold Agent has shot arrow Agent, wumpus are alive  timed logic  proliferation of propositions

D. Goforth, fall Wumpus world in FOL  the objects in the environment terms: constants, variables, functions  constants: times: 0, 1, 2,... headings: R, L, D, U coordinates: 1, 2, 3, 4 locations: 16 squares percepts: Stench, Breeze, Glitter, Bump, Scream, None actions: Turn(Left), Turn(Right), Forward, Grab, Shoot Agent, Wumpus

D. Goforth, fall Wumpus world in FOL  the objects in the environment terms: constants, variables, functions  functions: Square(x,y) // [x,y] p.259 Home(Wumpus) Perception(s, b, g, h, y) // [s, b, g, h, y] p.258 Heading(t), Location(t)

D. Goforth, fall Wumpus world in FOL  the basic knowledge atomic sentences: predicates, term=term  predicates: (true or false) properties (of one term/object)  Breezy(t) // agent feeling breeze at time t  Breeze(s) // breeze blowing on square s  Pit(s), Gold(s), etc.  Time(x) // object x is a time  Coordinate(x), Action(x), Heading(x), etc.

D. Goforth, fall Wumpus world in FOL  the basic knowledge atomic sentences: predicates, term=term  predicates: (true or false) relations (of multiple terms/objects)  At(s,t) // agent on square s at time t*  Adjacent (r,s) // squares r and s are adjacent  Alive(x,t) // x is alive at time t  Percept(p,t) // perception at time t  BestAction(a,t) // action a to take at time t *compare with p.259

D. Goforth, fall Wumpus world in FOL  the basic knowledge atomic sentences: predicates, term=term  term = term: (true or false) Home(Wumpus) = [3,3] Heading(5) = U

D. Goforth, fall Wumpus world in FOL  the knowledge base General knowledge Facts that are fixed Facts that may change over time Atomic sentences Compound sentences

D. Goforth, fall Wumpus world in FOL  the knowledge base General knowledge Facts that are constant Facts that may change over time

D. Goforth, fall Exploring Wumpus world in FOL Initial conditions: known unknown After first perception P 0, action A 0 : knownnew unknown P0P0 A0A0

D. Goforth, fall Exploring Wumpus world in FOL After first perception P 0, action A 0 : knownnew unknown P0P0 A0A0 After second perception P 1, action A 1 P1P1 A1A1

D. Goforth, fall Exploring Wumpus world in FOL Timed atomic sentences: Initial conditions At([1,1],0) Heading(R,0) Alive(Agent,0) Alive(Wumpus,0) then First perception: Percept([Stench,None, None, None, None],0)

D. Goforth, fall Exploring Wumpus world in FOL Percept([Stench, None, None, None, None],0) Understanding what is perceived ∀ b ∀ g ∀ h ∀ y ∀ t Percept([Stench,b,g, h, y],t) ⇒ Stinky(t) ∀ s ∀ g ∀ h ∀ y ∀ t Percept([s,None,g, h, y],t) ⇒  Glittery(t) Stinky(0)  Glittery(0) ∀ r ∀ t Stinky(t)  At(r,t) ⇒ Stinks(r) ∀ r ∀ t  Glittery(t)  At(r,t) ⇒  Glitters(r) Stinks([1,1])  Glitters ([1,1]) Fixed knowledge

D. Goforth, fall Exploring Wumpus world in FOL Updating timed knowledge: All atomic sentences may be different from t to t+1 BUT Most are the same UNLESS An action changes them ∀ r ∀ t At(r,t)  (  BestAction(Forward,t)  (Bumped(t+1)) ⇒ At(r,t+1) ∀ t Screams(t) ⇒  Alive(Wumpus,t) Time t Time t+1

D. Goforth, fall Exploring Wumpus world in FOL Deciding the best action (incomplete description here): Need to reason about the cave conditions Diagnostic rules (p.259) ∀ s Breezy(s) ⇒ ∃ r Adjacent(r,s)  Pit(r) Causal rules (p.260) ∀ r Pit(r) ⇒ [ ∀ s Adjacent(r,s) ⇒ Breezy(s)]