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]

Slides:



Advertisements
Similar presentations
Knowledge Representation using First-Order Logic
Advertisements

First-Order Logic Chapter 8.
Russell and Norvig Chapter 7
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Propositional Logic Reading: C , C Logic: Outline Propositional Logic Inference in Propositional Logic First-order logic.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
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.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Fall 2005.
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.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 6.
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 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?
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
LOGICAL AGENTS Yılmaz KILIÇASLAN. Definitions Logical agents are those that can:  form representations of the world,  use a process of inference to.
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 5 Dr Souham Meshoul CAP492.
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 2005.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2008.
Agents that Reason Logically Logical agents have knowledge base, from which they draw conclusions TELL: provide new facts to agent ASK: decide on appropriate.
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
Logical Agents Chapter 7 (based on slides from Stuart Russell and Hwee Tou Ng)
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
Pattern-directed inference systems
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Logical Agents Logic Propositional Logic Summary
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,
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
지식표현 Agent that reason logically
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.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
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.
CS6133 Software Specification and Verification
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
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.
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.
Propositional Logic: Logical Agents (Part I)
Knowledge and reasoning – second part
Introduction to Knowledge-bases
EA C461 – Artificial Intelligence Logical Agent
Learning and Knowledge Acquisition
Logical Agents Chapter 7 Selected and slightly modified slides from
Logical Agents Chapter 7.
Artificial Intelligence
Class #9– Thursday, September 29
Knowledge and reasoning – second part
Logical Agents Chapter 7.
EA C461 – Artificial Intelligence Logical Agent
CS 416 Artificial Intelligence
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:

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] - does not know own location Actions: forward, right, left, grab, shoot (1 arrow), climb (only from 1,1) Wumpus smells bad – adjacent squares (4 connected) have odor Breeze next to pits If you run into a wumpus or a pit, you die Goal: Climb out of cave with the gold (1000 pts) with minimal actions (-1 for each action, and –1000 if you die, -10 for using the arrow). Must have knowledge to infer new facts - e.g. no stench -> no wumpus in adjacent squares Must remember inferred facts (OK states, etc.) and use them in order to properly fulfill goals - KB construction

Knowledge Based Agents Have a Knowledge Base - set of representations of facts (rules) about the world Use knowledge about world/problem to reason about action, infer new knowledge, act quickly and more efficiently Can accept new tasks Can adapt to changes Can learn new facts –(add to KB) from environment –infer them from known facts (KB) Representation in KB of knowledge is a sentence (a sentence for each item known) TELL: method to add new sentences to KB ASK: method to find out new stuff from KB – anything ASK returns should “ follow ” from KB Background knowledge vs. added (telled) - KB construction Iteratively Tell (percept input(s)) and Ask (action output(s)) over time Levels of abstraction –Knowledge Level - what KB knows (most abstract) –Logical Level - Encoding into sentences - e.g. Mother (Mary, John) –Implementation Level - how encoding is actually implemented Must choose representation language and Tell/Ask algorithms which efficiently support the above levels of abstraction

Definitions: Representation and Inference Representation Language –Syntax – describes legal sentences –Semantics – describes interpretation/meaning of a given sentence Entailment - KB |= s (KB entails s) - sentence is necessarily true given KB –“ one fact follows from another (set of) fact(s) ” –Note that it all rests on the KB being correct in the first place! –a |= b iff in every model in which a is true, b is true An inference procedure can do one of two things: –Generate (entail) new sentences –Determine whether a specific sentence can be entailed from KB

More Definitions on Inference If a given inference procedure i can derive s from a KB we write –KB |-i s A proof of s is the record of operation of KB |-i s of a sound inference procedure i. A sound inference procedure generates only entailed sentences An inference procedure is complete if it can generate any entailed sentence Hey? Should an inference procedure be sound? Should it be complete? Obviously, right? A sentence may be true, false or unknown (standard logic) logical inference = deduction = sound reasoning Necessarily true = valid = tautology = true under all possible interpretations in all possible worlds. A Sentence is satisfiable if there exists some circumstance for which it is true, Unsatisfiable = contradiction = a sentence that is not satisfiable Being able to deduce tautologies and contradictions is important, since a computer does not understand meaning of variables, for example (if A then B), and A, a computer can deduce B regardless of interpretation. Thus, the inference procedure should be useful in arbitrary domains.

Representation Language Syntax and Semantics: if precisely defined then language is a logic A logic consists of: 1. Formal system for describing knowledge which includes: a) syntax of the system b) semantics of the system 2. Proof theory or an inference engine - a set of rules for deducing the entailments from a KB Representation Language – design decisions Expressiveness –Natural language - very expressive, but too ambiguous, assumes contextual knowledge –Computer languages (expect too much completeness) - how to handle uncertainty (wumpus in location a or b) –Balance of expressiveness, unambiguousness, easy support of inference

Propositional Logic (Some Salient Points) You can use a truth table to determine if a given KB entails a given sentence! How? Models of a sentence - all worlds in which the sentence is true. Quote from the book “ A sentences s is entailed by a KB if the models of the KB are all models of the sentence ”. What? What about (p  q  p  !p)? Inference Rules (P210) – Can ’ t we just use the truth table generation rule? A Logical Proof is a sequence of Inference rule applications Let ’ s try problem 7.10 a,b,c,d,e,f,g (p281)

Propositional Logic - Completeness and Complexity Propositional logic is complete can always fill out the truth table for n symbols exponential in n Is there a polynomial time proof procedure? Proven that satisfying a set of sentences is NP-complete Logical inference dependent on monotonicity of propositional and 1st order logic – Montonicity proclaims that –(KB 1 |= s)  ((KB 1  KB 2 ) |= s) –Hey! What happens if KB 2 = !s !!!!! How in the heck can anything be monotonic??!!?! Oh the humanity! Any sentence entailed by KB must still be derivable after KB is augmented by an entailed sentence. That makes sense!

Solving the Wumpus World with propositional logic Inferring there is a Wumpus in a square - Could do by truth table, but..., can derive it directly Inferred and Background Knowledge in WW Problems with propositional logic - Just propositions Action - shooting the arrow - How many rules are needed?

First Order Logic Objects, Properties, Relations (Function a special type of relation) Quantifiers allow general rules, etc. (properties, relations of collections of objects) Much more expressive than propositions (facts) Term is an object – a function is a term since it can be thought of as an alias for an object - NoseOf(John) Examples, interpretation, equivalence o o

There isn ’ t anything you can do that I can ’ t do better Nobody likes everybody There ’ s somebody for everyone Some people like Raymond If you go to the beach you get sand in your toes

Unify Knows(John, x), Knows(John, Jane) Knows(John, x) Knows(y, Todd) Knows(John, x) Knows(y, Mother(y)) Knows(John, x) Knows(x, Todd) A(x, y, B(x, y, z)), A(a, Bob, a) A(x, y, B(x, y, z)), A(a, Bob, B(c, b, a)) A(John, y, B(x, y, z)), A(a, Bob, B(a, b, c)) A(John, y, B(x, y, z)), A(a, b, B(a, M(b), c))

Inference in FOL Propositional inference rules all hold Inference rules for quantifiers o Universal Elimination - from (  x)(P(x)) we can infer P(Waffle) under substitution {x/Waffle} o Existential Elimination (constant symbol must not occur elsewhere) - from (  x)(P(x)) can infer P(Biscuit) - Biscuit is arbitrary (unique) name for the object which satisfies (  x)(P(x)) o Existential Introduction - from P(Cheese) can infer (  x)(P(x)) Nothing bigger than the ocean can live in the ocean. The earth is much bigger than the ocean. Sea turtles must spend at least part of their lives living in the ocean. Therefore the earth is not riding on the back of a giant sea turtle.