Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September.

Slides:



Advertisements
Similar presentations
Russell and Norvig Chapter 7
Advertisements

Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Artificial Intelligence Knowledge-based Agents Russell and Norvig, Ch. 6, 7.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
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.
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.
Logical Agents Chapter 7.
INTRODUÇÃO AOS SISTEMAS INTELIGENTES Prof. Dr. Celso A.A. Kaestner PPGEE-CP / UTFPR Agosto de 2011.
Logical Agents Chapter 7 Feb 26, Knowledge and Reasoning Knowledge of action outcome enables problem solving –a reflex agent can only find way from.
Rutgers CS440, Fall 2003 Propositional Logic Reading: Ch. 7, AIMA 2 nd Ed. (skip )
Logical Agents Chapter 7 (based on slides from Stuart Russell and Hwee Tou Ng)
Logical Agents. Knowledge bases Knowledge base = set of sentences in a formal language Declarative approach to building an agent (or other system): 
Logical Agents (NUS) Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
Computing & Information Sciences Kansas State University Lecture 10 of 42 CIS 530 / 730 Artificial Intelligence Lecture 10 of 42 William H. Hsu Department.
‘In which we introduce a logic that is sufficent for building knowledge- based agents!’
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 Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
1 Problems in AI Problem Formulation Uninformed Search Heuristic Search Adversarial Search (Multi-agents) Knowledge RepresentationKnowledge Representation.
Computing & Information Sciences Kansas State University Wednesday, 20 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 12 of 42 Wednesday, 20 September.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 11 of 41 Wednesday, 15.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 13 of 41 Monday, 20 September.
Computing & Information Sciences Kansas State University Lecture 13 of 42 CIS 530 / 730 Artificial Intelligence Lecture 13 of 42 William H. Hsu Department.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.
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.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 12 Friday, 17 September.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Computing & Information Sciences Kansas State University Monday, 25 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 14 of 42 Monday, 25 September.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 14 of 41 Wednesday, 22.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 15 of 41 Friday 24 September.
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Computing & Information Sciences Kansas State University Wednesday, 19 Sep 2007CIS 530 / 730: Artificial Intelligence Lecture 12 of 42 Wednesday, 19 September.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
1 Logical Agents Chapter 7. 2 Logical Agents What are we talking about, “logical?” –Aren’t search-based chess programs logical Yes, but knowledge is used.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Logical Agents Russell & Norvig Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean)
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Computing & Information Sciences Kansas State University CIS 530 / 730: Artificial Intelligence Lecture 09 of 42 Wednesday, 17 September 2008 William H.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 14 of 42 Wednesday, 22.
Logical Agents Chapter 7 Part I. 2 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic.
Computing & Information Sciences Kansas State University Wednesday, 04 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 17 of 42 Wednesday, 04 October.
Computing & Information Sciences Kansas State University Monday, 22 Sep 2008CIS 530 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 22 September.
Computing & Information Sciences Kansas State University Friday, 13 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 21 of 42 Friday, 13 October.
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
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)
CS666 AI P. T. Chung Logic Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Propositional Logic: Logical Agents (Part I)
EA C461 – Artificial Intelligence Logical Agent
Logical Agents Chapter 7.
Logical Agents Chapter 7 Selected and slightly modified slides from
Logical Agents Reading: Russell’s Chapter 7
Logical Agents Chapter 7.
Artificial Intelligence
Artificial Intelligence: Logic agents
Logical Agents Chapter 7.
Knowledge Representation I (Propositional Logic)
Problems in AI Problem Formulation Uninformed Search Heuristic Search
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September 2006 William H. Hsu Department of Computing and Information Sciences, KSU KSOL course page: Course web site: Instructor home page: Reading for Next Class: Section 7.5 – 7.7, p , Russell & Norvig 2 nd edition Logical Agents and Propositional Logic Discussion: Logic in AI

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture Outline Reading for Next Class: Sections 7.5 – 7.7, R&N 2 e Today: Logical Agents  Classical knowledge representation  Limitations of the classical symbolic approach  Modern approach: representation, reasoning, learning  “New” aspects: uncertainty, abstraction, classification paradigm Friday: Forward and Backward Chaining in Propositional Logic Next Week: Start of Material on Logic  Representation: “a bridge between learning and reasoning” (Koller)  Basis for automated reasoning: theorem proving, other inference Week of 25 Sep 2006: Theorem-Proving Techniques  Refutation  Resolution and Prolog Week of 02 Oct 2006: Ontology, Epistemology, and KE

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Overview Today’s Reading  Sections 7.1 – 7.4, Russell and Norvig 2e  Recommended references: Nilsson and Genesereth (Logical Foundations of AI) Previously: Logical Agents  Knowledge Bases (KB) and KB agents  Motivating example: Wumpus World  Logic in general  Syntax of propositional calculus Today  Propositional calculus (concluded)  Normal forms  Production systems  Predicate logic  Introduction to First-Order Logic (FOL): examples, inference rules (sketch) Next Week: First-Order Logic Review, Resolution

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Knowledge Representation (KR) for Intelligent Agent Problems Percepts  What can agent observe?  What can sensors tell it? Actions  What actuators does agent have?  In what context are they applicable? Goals  What are agents goals? Preferences (utilities)?  How does agent evaluate them (check environment, deliberate, etc.)? Environment  What are “rules of the world”?  How can these be represented, simulated?

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Review: Simple Knowledge-Based Agent Figure 6.1 p. 152 R&N Adapted from slides by S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Knowledge bases Knowledge base = set of sentences in a formal language 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 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 © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Wumpus World: PEAS description Performance measure  gold +1000, death  -1 per step, -10 for using the arrow Environment  Squares adjacent to wumpus are smelly  Squares adjacent to pit are breezy  Glitter iff gold is in the same square  Shooting kills wumpus if you are facing it  Shooting uses up the only arrow  Grabbing picks up gold if in same square  Releasing drops the gold in same square Sensors: Stench, Breeze, Glitter, Bump, Scream Actuators: Left turn, Right turn, Forward, Grab, Release, Shoot © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Wumpus world: characterization Fully Observable No – only local perception Deterministic Yes – outcomes exactly specified Episodic No – sequential at the level of actions Static Yes – Wumpus and Pits do not move Discrete Yes Single-agent? Yes – Wumpus is essentially a natural feature © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Logic in General Adapted from slides by S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Entailment 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 “the Giants won” and “the Reds won” entails “Either the Giants won or the Reds won”  E.g., x+y = 4 entails 4 = x+y  Entailment is a relationship between sentences (i.e., syntax) that is based on semantics © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Models 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 ╞ α iff M(KB)  M(α)  E.g. KB = Giants won and Reds won α = Giants won © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Types of Logic Adapted from slides by S. Russell, UC Berkeley Figure 8.1 p. 244 R&N 2e

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Propositional Logic: Semantics Adapted from slides by S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Propositional logic: Syntax Propositional logic is the simplest logic – illustrates basic ideas The proposition symbols P 1, P 2 etc are sentences  If S is a sentence,  S is a sentence (negation)  If S 1 and S 2 are sentences, S 1  S 2 is a sentence (conjunction)  If S 1 and S 2 are sentences, S 1  S 2 is a sentence (disjunction)  If S 1 and S 2 are sentences, S 1  S 2 is a sentence (implication)  If S 1 and S 2 are sentences, S 1  S 2 is a sentence (biconditional) © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Propositional Inference: Enumeration (Model Checking) Method Adapted from slides by S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Logical equivalence Two sentences are logically equivalent} iff true in same models: α ≡ ß iff α╞ β and β╞ α © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Normal Forms: CNF, DNF, Horn Adapted from slides by S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Adapted from slides by S. Russell, UC Berkeley Validity and Satisfiability

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Proof Methods Adapted from slides by S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Inference (Sequent) Rules for Propositional Logic Adapted from slides by S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Efficient propositional inference Two families of efficient algorithms for propositional inference: Complete backtracking search algorithms DPLL algorithm (Davis, Putnam, Logemann, Loveland) Incomplete local search algorithms WalkSAT algorithm

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence DPLL algorithm [1] Determine if an input propositional logic sentence (in CNF) is satisfiable. Improvements over truth table enumeration: 1.Early termination A clause is true if any literal is true. A sentence is false if any clause is false. 2.Pure symbol heuristic Pure symbol: always appears with the same "sign" in all clauses. e.g., In the three clauses (A   B), (  B   C), (C  A), A and B are pure, C is impure. Make a pure symbol literal true. 3.Unit clause heuristic Unit clause: only one literal in the clause The only literal in a unit clause must be true. © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence © 2004 S. Russell, UC Berkeley DPLL algorithm [2]

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Inference-based agents in wumpus world A wumpus-world agent using propositional logic:  P 1,1  W 1,1 B x,y  (P x,y+1  P x,y-1  P x+1,y  P x-1,y ) S x,y  (W x,y+1  W x,y-1  W x+1,y  W x-1,y ) W 1,1  W 1,2  …  W 4,4  W 1,1   W 1,2  W 1,1   W 1,3 …  64 distinct proposition symbols, 155 sentences © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence A propositional logic-Based Wumpus Agent © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence KB contains "physics" sentences for every single square For every time t and every location [x,y] L x,y  FacingRight t  Forward t  L x+1,y Rapid proliferation of clauses Limited Expressiveness of propositional logic © 2004 S. Russell, UC Berkeley

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Summary Points Propositional and First-Order Calculi (Today)  Propositional calculus (concluded)  Normal forms  Inference (aka sequent) rules  Production systems  Predicate logic without quantifiers  Introduction to First-Order Logic (FOL)  Examples  Inference rules (sketch) Friday: Forward and Backward Chaining Next Week: FOL Intro Week After: Resolution Theorem Proving, Prolog

Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Terminology Logical Frameworks  Knowledge Bases (KB)  Logic in general: representation languages, syntax, semantics  Propositional logic  First-order logic (FOL, FOPC)  Model theory, domain theory: possible worlds semantics, entailment Normal Forms  Conjunctive Normal Form (CNF)  Disjunctive Normal Form (DNF)  Horn Form Proof Theory and Inference Systems  Sequent calculi: rules of proof theory  Derivability or provability  Properties  Soundness (derivability implies entailment)  Completeness (entailment implies derivability)