
Logical Inference and Action Effects in Agent-Based Propositional Logic
Explore how logical inference is used by agents to construct plans based on knowledge bases without relying on inference history. Discover how to track the world's state and model action effects using a complete logical model.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Lecture notes for Principles of Artificial Intelligence (COMS 4720/5720) Yan-Bin Jia, Iowa State University Agent Based on Propositional Logic Write down a complete logical model of the effects of action. How logical inference can be used by an agent?. How to keep track of the world without resorting to inference history? How to use logical inference to construct plans based on the KB? Knowledge base (KB): general knowledge about how the world works percept sentences obtained in a particular world * Figures are from the textbook site unless a source is specifically cited.
Current State in the Wumpus World Axioms (given without being derived): ?1,1 ?1,1 // 16 rules of this type // 16 ?1,1 (?1,2 ?2,1) ?1,1 (?1,2 ?2,1) Exactly one wumpus // 1 wumpus ?1,1 ?1,2 ?4,3 ?4,4 1 ?,?,?,? 4 and (?,?) (?,?) // 1 Wumpus; // 16 2 2 ??,? ??,? =16 15 = 120 rules ??,?=true if there is a pit in ?,? . ??,?=true if there is a wumpus in ?,? , dead or alive. ??,?=true if the agent perceives a breeze in ?,? . ??,?=true if the agent perceives a stench in ?,? .
Representing Percepts A percept asserts something only about the current time. Stench4: the agent senses stench at time step 4 (in square ?). Stench3: the agent senses no stench at time step 3 (in square ?). Associate propositions with time steps for aspects of the world that changes over time. 0: the agent is in square 1,1 at time step 0. ?1,1 For any time step ? and any square [?,?], ? (Breeze? ??,?) (Stench? ??,?) fluent ??,? (aspect changing with time) ? ??,?
Describing a Transition Model Forward?: the agent executes the forward action at time ?. Effect axioms specify outcome of an action at the next time step. 0 FacingEast0 Forward0 (?2,1 1 1) ?1,1 ?1,1 // if the agent is at [1,1] facing east at time 0 and goes forward, // the result is that the agent is in [2,1] and no longer in [1,1]. Frame axioms assert all the proportions that remain the same. Forward? (HaveArrow? HaveArrorw?+1) Forward? (WumpusAlive? WumpusAlive?+1) ?(??)frame axioms for ? actions and ? fluents
Axioms for Successor States Successor-state axiom, one for every fluent ?, states that either the action at ? causes ? to be true at ? + 1, or ? was already true at ? and the action does not cause it to be false. ??+1 ActionCausesF? (?? ActionCausesNotF?) HaveArrow?+1 (HaveArro?? Shoot?) // no action, e.g., for reloading ?+1 (?1,1 ? ? ( Forward? Bump?+1)) (?1,2 (?2,1 FacingWest? Forward?) FacingSouth? Forward? ?1,1 ? Square-OK axiom asserts thata square is free of a pit or live Wumpus. ? ??,? (??,? WumpusAlive?) OK?,?
Initial Percepts and Actions Stench0 Breeze0 Glitter0 Bump0 Scream0; Forward0 Stench1 Breeze1 Glitter1 Bump1 Scream1; TurnRight1 Stench2 Breeze2 Glitter2 Bump2 Scream2; TurnRight2 Stench3 Breeze3 Glitter3 Bump3 Scream3; Forward3 Stench4 Breeze4 Glitter4 Bump4 Scream4; TurnRight4 Stench5 Breeze5 Glitter5 Bump5 Scream5; Forward5 Stench6 Breeze6 Glitter6 Bump6 Scream6 Query the knowledge base: 6 ASK ??,?1,2 ASK(??, ?1,3) =true ASK(??, ?3,1) =true =true 6) =true ASK(??,OK2,2 // the square [2,2] is OK to move into.