Guest Speaker. CS 416 Artificial Intelligence. First-order logic. Diagnostic Rules. Causal Rules. Causal Rules. Page 1

Similar documents
First Order Logic (FOL)

Artificial Intelligence Chapter 7: Logical Agents

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

7.5.2 Proof by Resolution

Artificial Intelligence Chapter 9: Inference in First-Order Logic

CS 771 Artificial Intelligence. First Order Logic Inference

Logical Agent & Propositional Logic

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

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

First Order Logic (FOL)

Inference in first-order logic

Inference in first-order logic

Inference in First-Order Logic

AI Programming CS S-09 Knowledge Representation

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Inference in first-order logic

Intelligent Agents. Pınar Yolum Utrecht University

CS 520: Introduction to Artificial Intelligence. Review

Logical Agents (I) Instructor: Tsung-Che Chiang

CS 771 Artificial Intelligence. Propositional Logic

Logical Agent & Propositional Logic

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

Outline. First-order logic. Atomic sentences. Intelligent Systems and HCI D7023E. Syntax of FOL: Basic elements. Pros and cons of propositional logic

First Order Logic: Syntax and Semantics

Logical Agents. Outline

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

J Propositional logic is declarative J Propositional logic is compositional: q meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and of P 1,2

Artificial Intelligence. Propositional logic

Propositional Logic: Bottom-Up Proofs

Logical Agents. Chapter 7

First-Order Logic. Propositional logic. First Order logic. First Order Logic. Logics in General. Syntax of FOL. Examples of things we can say:

How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague, such as: this paint is grey.

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

CS 4700: Foundations of Artificial Intelligence

CS 730/730W/830: Intro AI

Knowledge Representation using First-Order Logic (Part III)

CS 730/830: Intro AI. 3 handouts: slides, asst 6, asst 7. Wheeler Ruml (UNH) Lecture 12, CS / 16. Reasoning.

Introduction to Artificial Intelligence 2 nd semester 2016/2017. Chapter 9: Inference in First-Order Logic

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Lecture 7: Logic and Planning

Propositional Logic: Methods of Proof (Part II)

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

Supplementary Logic Notes CSE 321 Winter 2009

Reasoning. Inference. Knowledge Representation 4/6/2018. User

Knowledge and reasoning 2

Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic

Class Assignment Strategies

6.825 Techniques in Artificial Intelligence. Logic Miscellanea. Completeness and Incompleteness Equality Paramodulation

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

Inference in first-order logic

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

Proof Methods for Propositional Logic

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Inference Methods In Propositional Logic

Introduction to Intelligent Systems

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

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

Inference in First-Order Predicate Calculus

First-Order Logic. Chapter 8

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

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

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Adam Blank Spring 2017 CSE 311. Foundations of Computing I

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

Propositional Logic: Logical Agents (Part I)

Deliberative Agents Knowledge Representation I. Deliberative Agents

[1] Describe with examples, the three inference rules involving quantifiers

Agents that reason logically

CS 188: Artificial Intelligence Spring 2007

First-Order Logic. Chapter 8

Contents Chapters 2 & 3

Midterm Examination CS540: Introduction to Artificial Intelligence

CSC242: Intro to AI. Lecture 13. Thursday, February 28, 13

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

Strong AI vs. Weak AI Automated Reasoning

Inference Methods In Propositional Logic

CSCI-495 Artificial Intelligence. Lecture 17

Inf2D 11: Unification and Generalised Modus Ponens

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

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

Logic: Bottom-up & Top-down proof procedures

Parts 3-6 are EXAMPLES for cse634

Knowledge Representation and Reasoning

Propositional Logic: Logical Agents (Part I)

Logic & Logic Agents Chapter 7 (& background)

Outline. Reducing first-order inference to propositional inference Unification. Forward chaining Backward chaining

Quadratic Equations Part I

CS 380: ARTIFICIAL INTELLIGENCE

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Logic. Propositional Logic: Syntax

Indicative conditionals

KR: First Order Logic - Intro

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

Logical Agents: Propositional Logic. Chapter 7

Introduction to Computational Complexity

Computational Logic Lecture 3. Logical Entailment. Michael Genesereth Autumn Logical Reasoning

First-Order Logic. Chapter 8

Transcription:

Page 1 Guest Speaker CS 416 Artificial Intelligence Lecture 13 First-Order Logic Chapter 8 Topics in Optimal Control, Minimax Control, and Game Theory March 28 th, 2 p.m. OLS 005 Onesimo Hernandez-Lerma Department of Mathematics CINVESTAV-IPN, Mexico City This is a nontechnical introduction, mainly thru examples, to some recent topics in control and game theory, including adaptive control, minimax control (a.k.a. "worst-case control" or "games against nature"), partially observable systems (a.k.a. controlled "hidden Markov models"), cooperative and noncooperative game equilibria, etc. First-order logic We saw how propositional logic can create intelligent behavior But propositional logic is a poor representation for complex environments First-order logic is a more expressive and powerful representation Diagnostic Rules Rules leading from observed effects to hidden causes After you ve observed something, this rule offers an explanation These rules explain what happened in the past Breezy implies pits Not breezy implies no pits Combining Causal Rules Some hidden property causes percepts to be generated These are predictions of perceptions you expect to have in the future given current conditions A pit causes adjacent squares to be breezy Causal Rules The causal rules formulate a model Knowledge of how the environment operates Model can be very useful and important and replace straightforward diagnostic approaches If all squares adjacent to a square a pitless, it will not be breezy

Page 2 Conclusion If the axioms correctly and completely describe the way the world works and the way percepts are produced, then any complete logical inference procedure will infer the strongest possible description of the world state given the available percepts The agent designer can focus on getting the knowledge right without worrying about the processes of deduction Discussion of models Let s think about how we use models every day Daily stock prices Seasonal stock prices Seasonal temperatures Annual temperatures Knowledge Engineering Understand a particular domain How does stock trading work Learn what concepts are important in the domain (features) Buyer confidence, strength of the dollar, company earnings, interest rate Create a formal representation of the objects and relations in the domain Forall stocks (price = low ^ confidence = high) => profitability = high Identify the task What is the range of inputs and outputs Will the stock trading system have to answer questions about the weather? Perhaps if you re buying wheat futures Must the agent store daily temperatures or can it use another agent? Assemble the relevant knowledge You know what information is relevant How can you accumulate the information? Not formal description of knowledge at this point Just principled understanding of where information resides Formalize the knowledge Decide on vocabulary of predicates, functions, and constants Beginning to map domain into a programmatic structure You re selecting an ontology A particular theory of how the domain can be simplified and represented at its basic elements Mistakes here cause big problems

Page 3 Encode general knowledge Write down axioms for all vocabulary terms Define the meaning of terms Errors will be discovered and knowledge assembly and formalization steps repeated Map to this particular instance Encode a description of the specific problem instance Should be an easy step Write simple atomic sentences Derived from sensors/percepts Derived from external data Use the knowledge base Pose queries and get answers Use inference procedure Derive new facts Debug the knowledge base There will most likely be bugs If inference engine works bugs will be in knowledge base Missing axioms Axioms that are too weak Conflicting axioms Enough talk, let s get to the meat Chapter 9 Inference in First-Order Logic We want to use inference to answer any answerable question stated in first-order logic Propositional Inference We already know how to perform inference in propositional logic Transform first-order logic to propositional logic First-order logic makes powerful use of variables Universal quantification (for all x) Existential quantification (there exists an x)

Page 4 Converting universal quantifiers Universal Instantiation Example: after substitution {x/john}, {x/richard}, {x/father(john)} becomes We ve replaced the variable with all possible ground terms (terms without variables) Converting existential quantifiers Existential Instantiation Example: There is some thing that is a crown and is on John s head Let s call it C 1 becomes: You can replace the variable with a constant symbol that does not appear elsewhere in the knowledge base The constant symbol is a Skolem constant Existential Instantiation Only perform substitution once There exists an x s.t. Kill (x, Victim) Someone killed the victim Maybe more than once person killed the victim Existential quantifier says at least one person was killer Replacement is Kill (Murderer, Victim) Complete reduction Convert existentially quantified sentences Creates one instantiation Convert universally quantified sentences Creates all possible instantiations Use propositional logic to resolve Every first-order knowledge base and query can be propositionalized in such a way that entailment is preserved Trouble ahead! Universal quantification with functions: What about (Father(Father(Father(John))))? Isn t it possible to have infinite number of substitutions? How well will the propositional algorithms work with infinite number of sentences? A theorem of completeness if a sentence is entailed by the original, first-order knowledge base then there is a proof involving just a finite subset of the propositional knowledge base We want to find that finite subset First try proving the sentence with constant symbols Then add all terms of depth 1: Father (Richard) Then add all terms of depth 2: Father (Father (Richard))

Page 5 Still more trouble Completeness says that if statement is true in first-order logic, it will also be true in propositions But what happens if you ve been waiting for your proposition-based algorithm to return an answer and it has been a while? Is the statement not true? Is the statement just requiring lots of substitutions? You don t know! The Halting Problem Alan Turing and Alonzo Church proved You can write an algorithm that says yes to every entailed sentence but You no algorithm exists that says no to every nonentailed sentence So if your entailment-checking algorithm hasn t returned yes yet, you cannot know if that s because the sentence is not entailed. Entailment for first-order logic is semi-decidable Adapting Modus Ponens Did you notice how inefficient previous method was? Instantiate universal quantifiers by performing lots of substitutions until (hopefully quickly) a proof was found Why bother substituting Richard for x when you and I know it won t lead to a proof? Clearly, John is the right substitution for x. Modus Ponens for propositional logic Generalized Modus Ponens For atomic sentences p i, p i, θ where there is a substitution θ such that Subst{q, p i } = Subst{q, p i }: Generalized Modus Ponens This is a lifted version It raises Modus Ponens to first-order logic We want to find lifted versions of forward chaining, backward chaining, and resolution algorithms Lifted versions make only those substitutions that are required to allow particular inferences to proceed

Page 6 Generalized Modus Ponens requires finding good substitutions Logical expressions must look identical Other lifted inference rules require this as well is the process of finding substitutions Unify takes two sentences and returns a unifier if one exists Examples to answer the query, Knows (John, x): Whom does John know? Consider the last sentence: This fails because x cannot take on two values But Everyone knows Elizabeth and it should not fail Must standardize apart one of the two sentences to eliminate reuse of variable Multiple unifiers are possible: or Which is better, Knows (John, z) or Knows (John, John)? Second could be obtained from first with extra subs First unifier is more general than second because it places fewer restrictions on the values of the variables There is a single most general unifier for every unifiable pair of expressions Storage and Retrieval Remember Ask() and Tell() from propositions? Replace with Store(s) and Fetch(q) Store puts a sentence, s, into the KB Fetch returns all unifiers such that query q unifies with some sentence in the KB An example is when we ask Knows (John, x) and returns Fetch() Simple Store all facts in KB as one long list For each fetch(q), call Unify (q, s) for every sentence s in list Inefficient because we re performing so many unifies Complex Only attempt unfications that have some chance of succeeding

Page 7 Predicate Indexing Index the facts in the KB Example: unify Knows (John, x) with Brother (Richard, John) Predicate indexing puts all the Knows facts in one bucket and all the Brother facts in another Might not be a win if there are lots of clauses for a particular predicate symbol Consider how many people Know one another Instead index by predicate and first argument Clauses may be stored in multiple buckets Subsumption lattice How to construct indices for all possible queries that unify with it Example: Employs (AIMA.org, Richard) Subsumption Lattice Subsumption lattice Each node reflects making one substitution The highest common descendent of any two nodes is the result of applying the most general unifier Predicate with n arguments will create a lattice with O(2 n ) nodes Benefits of indexing may be outweighed by cost of storing and maintaining indices