uncertainty
play

Uncertainty Marco Chiarandini Department of Mathematics & - PowerPoint PPT Presentation

Lecture 4 Uncertainty Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Slides by Stuart Russell and Peter Norvig Knowledge-based Agents Logic in General Probability Calculus Outline Example:


  1. Lecture 4 Uncertainty Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Slides by Stuart Russell and Peter Norvig

  2. Knowledge-based Agents Logic in General Probability Calculus Outline Example: Wumpus World 1. Knowledge-based Agents Wumpus Example 2. Logic in General 3. Probability Calculus Basic rules Conditional Independence 4. Example: Wumpus World 2

  3. Knowledge-based Agents Logic in General Probability Calculus Knowledge bases Example: Wumpus World Knowledge base = set of sentences in a formal language domain−independent algorithms Inference engine Knowledge base domain−specific content Declarative approach to building an agent (or other system): Tell it what it needs to know Then it can Ask itself what to do—answers should follow from the KB Agents 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 3

  4. Knowledge-based Agents Logic in General Probability Calculus A simple knowledge-based agent Example: Wumpus World function KB-Agent( percept ) returns an action static : KB , a knowledge base t , a counter, initially 0, indicating time Tell( KB , Make-Percept-Sentence( percept , t )) action ← Ask( KB , Make-Action-Query( t )) Tell( KB , Make-Action-Sentence( action , t )) t ← t + 1 return action The agent must be able to: Represent states, actions, etc. Incorporate new percepts Update internal representations of the world Deduce hidden properties of the world Deduce appropriate actions 4

  5. Knowledge-based Agents Logic in General Probability Calculus Wumpus World PEAS description Example: Wumpus World Performance measure gold +1000, death -1000 -1 per step, -10 for using the arrow Breeze Stench 4 PIT Environment Breeze Squares adjacent to wumpus are smelly Breeze 3 PIT Stench Squares adjacent to pit are breezy Gold Glitter iff gold is in the same square Breeze Stench 2 Shooting kills wumpus if you are facing it Shooting uses up the only arrow Breeze Breeze 1 PIT Grabbing picks up gold if in same square START Releasing drops the gold in same square 1 2 3 4 Actuators LeftTurn , RightTurn , Forward , Grab , Release , Shoot Sensors Breeze , Glitter , Smell 6

  6. Knowledge-based Agents Logic in General Probability Calculus Wumpus world – Properties Example: Wumpus World Fully vs Partially observable?? Breeze 4 Stench No—only local perception PIT Deterministic vs Stochastic?? Breeze Breeze Deterministic—outcomes exactly specified 3 PIT Stench Episodic vs Sequential?? Gold sequential at the level of actions Breeze Stench 2 Static vs Dynamic?? Static—Wumpus and Pits do not move Breeze Breeze Discrete vs Continous?? 1 PIT START Discrete 1 2 3 4 Single-agent vs Multi-Agent?? Single—Wumpus is essentially a natural feature 7

  7. Knowledge-based Agents Logic in General Probability Calculus Exploring a wumpus world Example: Wumpus World P? OK P B OK P? BGS OK OK A A A OK S OK W A A 8

  8. Knowledge-based Agents Logic in General Probability Calculus Other tight spots Example: Wumpus World P? B OK P? P? A Breeze in (1,2) and (2,1) = ⇒ no safe actions OK B OK P? A A Assuming pits uniformly distributed, (2,2) has pit w/ prob 0.86, vs. 0.31 Smell in (1,1) = ⇒ cannot move Can use a strategy of coercion: shoot straight ahead S wumpus was there = ⇒ dead = ⇒ A safe wumpus wasn’t there = ⇒ safe 9

  9. Knowledge-based Agents Logic in General Probability Calculus Outline Example: Wumpus World 1. Knowledge-based Agents Wumpus Example 2. Logic in General 3. Probability Calculus Basic rules Conditional Independence 4. Example: Wumpus World 10

  10. Knowledge-based Agents Logic in General Probability Calculus Logic in general Example: Wumpus World 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 2 + 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 11

  11. Knowledge-based Agents Logic in General Probability Calculus Entailment Example: Wumpus World 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 E.g., the KB containing “OB won” and “FCK won” entails “Either OB won or FCK won” E.g., x + y = 4 entails 4 = x + y Entailment is a relationship between sentences (i.e., syntax ) that is based on semantics Key idea: brains process syntax (of some sort) trying to reproduce this mechanism 12

  12. Knowledge-based Agents Logic in General Probability Calculus Models Example: Wumpus World Logicians typically think in terms of models, which are formally structured worlds with respect to which truth can be evaluated We say m is a model of a sentence α if α is true in m M ( α ) is the set of all models of α Then KB | = α if and only if M ( KB ) ⊆ M ( α ) E.g. KB = OB won and FCK won x x x x α = OB won x x x x x M( ) xx x x x x x x x x x x x x x x x x x x xx x x x x x x x x x M(KB) x x x x x x x 13

  13. Knowledge-based Agents Logic in General Probability Calculus Entailment in the wumpus world Example: Wumpus World Situation after detecting nothing in [1,1], ? ? moving right, breeze in [2,1] B ? Consider possible models for ?s A A assuming only pits 3 Boolean choices = ⇒ 8 possible models 14

  14. Knowledge-based Agents Logic in General Probability Calculus Wumpus models Example: Wumpus World 2 PIT 2 Breeze 1 Breeze 1 PIT 1 2 3 1 2 3 2 PIT 2 PIT 2 Breeze 1 PIT Breeze 1 Breeze 1 1 2 3 1 2 3 1 2 3 2 PIT PIT 2 PIT Breeze 1 Breeze 1 PIT 2 PIT PIT 1 2 3 1 2 3 Breeze 1 PIT 1 2 3 15

  15. Knowledge-based Agents Logic in General Probability Calculus Wumpus models Example: Wumpus World 2 PIT 2 Breeze 1 Breeze 1 PIT 1 2 3 KB 1 2 3 2 PIT 2 PIT 2 Breeze 1 PIT Breeze 1 Breeze 1 1 2 3 1 2 3 1 2 3 2 PIT PIT 2 PIT Breeze 1 Breeze 1 PIT 2 PIT PIT 1 2 3 1 2 3 Breeze 1 PIT 1 2 3 KB = wumpus-world rules + observations 16

  16. Knowledge-based Agents Logic in General Probability Calculus Wumpus models Example: Wumpus World 2 PIT 2 Breeze 1 Breeze 1 PIT 1 2 3 KB 1 2 3 1 2 PIT 2 PIT 2 Breeze 1 PIT Breeze 1 Breeze 1 1 2 3 1 2 3 1 2 3 2 PIT PIT 2 PIT Breeze 1 Breeze 1 PIT 2 PIT PIT 1 2 3 1 2 3 Breeze 1 PIT 1 2 3 KB = wumpus-world rules + observations α 1 = “[1,2] is safe”, KB | = α 1 , proved by model checking 17

  17. Knowledge-based Agents Logic in General Probability Calculus Wumpus models Example: Wumpus World 2 PIT 2 Breeze 1 Breeze 1 PIT 1 2 3 KB 1 2 3 2 PIT 2 PIT 2 Breeze 1 PIT Breeze 1 Breeze 1 1 2 3 1 2 3 1 2 3 2 PIT PIT 2 PIT Breeze 1 Breeze 1 PIT 2 PIT PIT 1 2 3 1 2 3 Breeze 1 PIT 1 2 3 KB = wumpus-world rules + observations 18

  18. Knowledge-based Agents Logic in General Probability Calculus Wumpus models Example: Wumpus World 2 PIT 2 Breeze 1 Breeze 2 1 PIT 1 2 3 KB 1 2 3 2 PIT 2 PIT 2 Breeze 1 PIT Breeze 1 Breeze 1 1 2 3 1 2 3 1 2 3 2 PIT PIT 2 PIT Breeze 1 Breeze 1 PIT 2 PIT PIT 1 2 3 1 2 3 Breeze 1 PIT 1 2 3 KB = wumpus-world rules + observations α 2 = “[2,2] is safe”, KB �| = α 2 19

  19. Knowledge-based Agents Logic in General Probability Calculus Inference Example: Wumpus World KB ⊢ i α = sentence α can be derived from KB by procedure i Consequences of KB are a haystack; α is a needle. Entailment = needle in haystack; inference = finding it Soundness: i is sound if whenever KB ⊢ i α , it is also true that KB | = α Completeness: i is complete if whenever KB | = α , it is also true that KB ⊢ i α Preview: we will define a logic (first-order logic) which is expressive enough to say almost anything of interest, and for which there exists a sound and complete inference procedure. That is, the procedure will answer any question whose answer follows from what is known by the KB . 20

  20. Knowledge-based Agents Logic in General Probability Calculus Outline Example: Wumpus World 1. Knowledge-based Agents Wumpus Example 2. Logic in General 3. Probability Calculus Basic rules Conditional Independence 4. Example: Wumpus World 21

  21. Knowledge-based Agents Logic in General Probability Calculus Outline Example: Wumpus World ♦ Uncertainty ♦ Probability ♦ Syntax and Semantics ♦ Inference ♦ Independence and Bayes’ Rule 22

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend