Logical Agents. Seung-Hoon Na Chonbuk National University. 1 Department of Computer Science

Similar documents
Logical Agents. Santa Clara University

Logical Agents. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 7

Logical Agents. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 7

Logical Agents. Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 7

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

Intelligent Agents. Pınar Yolum Utrecht University

Logical Agents. Outline

CS 4700: Foundations of Artificial Intelligence

Logical Agents. Chapter 7

Logical Agents (I) Instructor: Tsung-Che Chiang

Class Assignment Strategies

Agents that reason logically

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Introduction to Intelligent Systems

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World

Kecerdasan Buatan M. Ali Fauzi

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Logical Agent & Propositional Logic

Logical Agent & Propositional Logic

Introduction to Artificial Intelligence. Logical Agents

Lecture Overview [ ] Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 6. Motivation. Logical Agents

Introduction to Intelligent Systems

CS 771 Artificial Intelligence. Propositional Logic

Artificial Intelligence Chapter 7: Logical Agents

Propositional Logic: Logical Agents (Part I)

Foundations of Artificial Intelligence

CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents

Foundations of Artificial Intelligence

Knowledge-based Agents. CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents. Outline. Knowledge-based Agents

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Propositional Logic: Logical Agents (Part I)

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World

Lecture 7: Logic and Planning

Logical Agents: Propositional Logic. Chapter 7

Logic & Logic Agents Chapter 7 (& background)

Foundations of Artificial Intelligence

Proof Methods for Propositional Logic

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

7. Logical Agents. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Knowledge base. Models and Planning. Russell & Norvig, Chapter 7.

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

Logic. proof and truth syntacs and semantics. Peter Antal

TDT4136 Logic and Reasoning Systems

Logical agents. Chapter 7. Chapter 7 1

Revised by Hankui Zhuo, March 21, Logical agents. Chapter 7. Chapter 7 1

Logic & Logic Agents Chapter 7 (& Some background)

CS 188: Artificial Intelligence Spring 2007

CS 380: ARTIFICIAL INTELLIGENCE LOGICAL AGENTS. Santiago Ontañón

AI Programming CS S-09 Knowledge Representation

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT

CS:4420 Artificial Intelligence

CSCI 5582 Artificial Intelligence. Today 9/28. Knowledge Representation. Lecture 9

Chương 3 Tri th ức và lập luận

Principles of Intelligent Systems: Situation Calculus

Logical Agents. Outline

Artificial Intelligence

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Logical Agents. Chapter 7

Knowledge- Based Agents. Logical Agents. Knowledge Base. Knowledge- Based Agents 10/7/09

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13

CS 4700: Artificial Intelligence

Artificial Intelligence. Propositional logic

Introduction to Arti Intelligence

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Inference Methods In Propositional Logic

Artificial Intelligence

RN, 1 C 0 h. a 3 pter Situation Calculus 1

20/c/applet/more.html Local Beam Search The best K states are selected.

Propositional inference, propositional agents

Inference Methods In Propositional Logic

Rational Agents. Paolo Turrini. Introduction to Artificial Intelligence 2nd Part. Department of Computing, Imperial College London

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Last update: March 4, Logical agents. CMSC 421: Chapter 7. CMSC 421: Chapter 7 1

Lecture 7: Logical Agents and Propositional Logic

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón

First Order Logic (FOL)

Adversarial Search & Logic and Reasoning

Pengju XJTU 2016

Outline. Logic. Knowledge bases. Wumpus world characteriza/on. Wumpus World PEAS descrip/on. A simple knowledge- based agent

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

What is the relationship between number of constraints and number of possible solutions?

First Order Logic (FOL)

COMP3702/7702 Artificial Intelligence Week 5: Search in Continuous Space with an Application in Motion Planning " Hanna Kurniawati"

Planning and search. FOL and situation calculus. FOL and situation calculus 1

A simple knowledge-based agent. Logical agents. Outline. Wumpus World PEAS description. Wumpus world characterization. Knowledge bases.

CS 380: ARTIFICIAL INTELLIGENCE

Artificial Intelligence

Lecture 6: Knowledge 1

Knowledge and reasoning 2

7.5.2 Proof by Resolution

Knowledge Representation Logic and Inference Propositional Logic First-order logic Vumpus World

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Logic: Propositional Logic (Part I)

First-order logic. Chapter 8. Chapter 8 1

Logic. Stephen G. Ware CSCI 4525 / 5525

Logical Agents. Administrative. Thursday: Midterm 1, 7p-9p. Next Tuesday: DOW1013: Last name A-M DOW1017: Last name N-Z

CS 380: ARTIFICIAL INTELLIGENCE INFERENCE IN PROPOSITIONAL LOGIC

Propositions. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 5.1, Page 1

UNCERTAINTY. In which we see what an agent should do when not all is crystal-clear.

Transcription:

Logical Agents Seung-Hoon Na 1 1 Department of Computer Science Chonbuk National University 2017.10.10 eung-hoon Na (Chonbuk National University) Logical Agents 2017.10.10 1 / 18

Wumpus world: The current state of the world a square is breezy: a neighboring square has a pit a square is smelly: a neighboring square has a wumpus There is at least one wumpus. There is at most one wumpus. B 1,1 (P 1,2 P 2,1 ) S 1,1 (W 1,2 W 2,1 ) W 1,1 W 1,2 W 4,3 W 4,4 W 1,1 W 1,2 W 1,1 W 1,3 W 1,1 W 1,4 W 4,3 W 4,4 Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 2 / 18

Associating propositions with time steps A percept should assert something only about the current time: E.g. Stench t, Breeze t, Glitter t, etc. Otherwise, suppose that there was no stench at the previous time, i.e., Stench was asserted. Then, if there is currently a stench, we cannot add Stench at the current time, because the new assertion results in a contradiction. Fluent: refers to an aspect of the world that changes. Atemporal variances: symbols associated with permanent aspects of the world do not need a time superscript. For any time step t and any square [x, y], we assert: L t x,y ( Breeze t B x,y ) L t x,y ( Stench t S x,y ) Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 3 / 18

Effect axioms Transition models on fluents: Fluents chance as the result of actions taken by the agent. Effect axioms: Specify the outcome of an action at the next time step. L 0 1,1 FacingEast 0 Forward 0 (L 1 2,1 L 1 1,1) Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 4 / 18

Frame problem Frame problem: need to represent a long list of facts that are not changed by an action Suppose that the agent move Forward at time 0. Given effect axioms, we have L 1 2,1. Thus, ASK(KB, L1 2,1 ) = true. However, ASK(KB, HaveArrow 1 ) = false: The agent cannot provie it still has the arrow now doesn t have it. Effect axioms only fail to state what remains unchanged as the result of an action. Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 5 / 18

Frame axioms Frame axioms: As one possible solution to the frame problem, we can add frame axioms that explicitly asserts all the propositions that remain the same. Forward t ( HaveArrow t HaveArrow t+1) Forward t ( WumpusAlive t WumpusAlive t+1) Representational frame problem: With m actions and n fluents, the set of frame axioms is O(mn), being largely inefficient. Need to use Locality: Each action typically changes no more than some small number k of fluents, thus requiring to define O(mk), rather than O(mn). Inferential frame problem: The problem of projecting forward the results of t step plan of action in time O(kt) rather than O(nt) - The need to reason explicitly about things that don t change. Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 6 / 18

Successor-state axiom Successor-state axiom: Axioms about fluents. For each fluent F, a successor-state axiom defines F t+1 in terms of fluents at time t and the actions that may have occurred at time t, with the following schema: F t+1 ActionCausesF t ( F t ActionCausesNotF t) For HaveArrow HaveArrow t+1 ( HaveArrow t Shoot t) For the agent s location L t+1 1,1 ( L t 1,1 ( Forward t Bump t+1)) ( L t 1,2 ( South t Forward t)) ( L t 2,1 ( West t Forward t)) Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 7 / 18

Wumpus world: Question about the current state of the world Given the initial sequence of percepts and actions: Now, we have ASK(KB, L 6 1,2 ) = true, ASK(KB, W 1,3) = true, ASK(KB, P 1,3 ) = true. We can also define the additional axiom to check whether a square is OK: OK t x,y P x,y ( W x,y WumpusAlive t) Then, we have ASK(KB, OK 6 2,2 ) = true. Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 8 / 18

Qualification problem We need to confirm all the necessary preconditions of an action hold for it to have its intended effect. E.g.: the Forward action moves the agent ahead unless there is a wall in the way, but there are many other unusual exceptions that could cause the action to fail: the agent might trip and fall, be stricken with a heart attack, be carried away by giant bats, etc. Specifying all these exceptions is called the qualification problem: No complete solution within logic, raising a designing problem on knowledge base. Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 9 / 18

Hybrid agent: combine logical inference with problem-solving ability Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 10 / 18

Hybrid agent: combine logical inference with problem-solving ability Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 11 / 18

Logical state estimation The weakness in the algorithm of hybrid agent: as time goes by, the computational expense involved in the calls to ASK goes up and up. This is because the required inferences have to go back further and further in time and involve more and more proposition symbols. Belief state: some representation of the set of all possible current states of the world. Here, the belief state is a logical sentence. WumpusAlive 1 L 1 2,1 B 2,1 (P 3,1 P 2,2 ) State estimation: the process of updating the belief state as new percepts arrive. Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 12 / 18

Approximate Logical state estimation Maintaining an exact belief state as a logical formula: not tractable. For n fluent symbols for time t, there are 2 n possible states and 2 2n belief states. Approximate state estimation: Represent belief states as conjunctions of literals, 1-CNF formulas. The agent program tries to prove X t and X t for each symbol X t, given the belief state at t 1. The conjunction of provable literals becomes the new belief state, and the previous belief state is discarded. Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 13 / 18

Approximate Logical state estimation the 1-CNF belief state acts as a simple outer envelope: The set of possible states represented by the 1-CNF belief state includes all states that are in fact possible given the full percept history. Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 14 / 18

Making plans by propositional inference 1) Construct a sentence that includes. Init 0, a collection of assertions about the initial state; Transition 1,, Transition t, the successor-state axioms for all possible actions at each time up to some maximum time t; the assertion that the goal is achieved at time t: HaveGold t ClimbedOut t. 2) Present the whole sentence to a SAT solver. If the solver finds a satisfying model, then the goal is achievable; if the sentence is unsatisfiable, then the planning problem is impossible. 3) Assuming a model is found, extract from the model those variables that represent actions and are assigned true. The resulting model is provided as a plan to achieve the goals. Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 15 / 18

Making plans by propositional inference Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 16 / 18

SATPLAN: Entailment vs. Satisfiability Suppose that L 0 1,1, we didn t tell the agenet that it can ts be in two places at once. Then, L 0 2,1 is unknown For entailment, the unknown literal L 0 2,1 cannot be used in a proof For satisfiability, the unknown literal L 0 2,1 can be set to whatever value helps to make the goal true. Thus, SATPLAN: a good debugging tool for KBs because it reveals places where knowledge is missing. E.g.: we can fix the knowledge base by asserting that, at each time step, the agent is in exactly one location. Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 17 / 18

SATPLAN: On satifiability issue - Additional axioms 1. SATPLAN finds models with impossible actions, such as shooting with no arrow. Precondition axioms: stating that an action occurrence requires the preconditions to be satisfied Shoot t HaveArrow t (1) 2. SATPLAN finds the models with multiple simultaneous actions. Action exclusion axioms: every pair of actions A t i and A t j, we add the axiom A t i A t j (2) Seung-Hoon Na (Chonbuk National University) Logical Agents 2017.10.10 18 / 18