Introduc)on to Ar)ficial Intelligence

Similar documents
First-order logic. First-order logic. Logics in general. Outline. Syntax of FOL: Basic elements. Pros and cons of propositional logic

Lecture 8: (Predicate) First Order Logic

CS 380: ARTIFICIAL INTELLIGENCE FIRST ORDER LOGIC. Santiago Ontañón

First-order logic. Chapter 8. Chapter 8 1

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

First-order logic. Chapter 8. Chapter 8 1

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

First Order Logic. Philipp Koehn. 8 October 2015

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

Artificial Intelligence. Propositional logic

CS 380: ARTIFICIAL INTELLIGENCE INFERENCE IN PROPOSITIONAL LOGIC

First Order Logic (FOL)

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

Propositional Logic: Logical Agents (Part I)

Introduc)on to Ar)ficial Intelligence

Logical Agents. Santa Clara University

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

First Order Logic (FOL)

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

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

First-Order Logic. CS367 ARTIFICIAL INTELLIGENCE Chapter 8

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

Knowledge Based Systems: Logic and Deduction

Inference in first-order logic

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

CSCI-495 Artificial Intelligence. Lecture 17

W3203 Discrete Mathema1cs. Logic and Proofs. Spring 2015 Instructor: Ilia Vovsha. hcp://

First-Order Logic. Language of FOL: Grammar. 22c:145 Artificial Intelligence. Norvig. Universal quantification. A common mistake to avoid

Artificial Intelligence Chapter 7: Logical Agents

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

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

Propositional Logic: Logical Agents (Part I)

10/13/15. Proofs: what and why. Proposi<onal Logic Proofs. 1 st Proof Method: Truth Table. A sequence of logical arguments such that:

Logical Agents. Outline

First-Order Logic. Michael Rovatsos. University of Edinburgh R&N: February Informatics 2D

Lecture 7: Logic and Planning

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

First order logic (FOL) Chapters 8 & 9

Propositional Logic: Review

Intelligent Agents. Pınar Yolum Utrecht University

First Order Logic Semantics (3A) Young W. Lim 9/17/17

Artificial Intelligence Knowledge Representation I

Knowledge and reasoning 2

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Proofs Sec*ons 1.6, 1.7 and 1.8 of Rosen

Proposi'onal Logic Not Enough

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

First Order Logic Semantics (3A) Young W. Lim 8/9/17

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

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

7.5.2 Proof by Resolution

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

Introduction to Artificial Intelligence. Logical Agents

Class Assignment Strategies

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

CS 380: ARTIFICIAL INTELLIGENCE

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

proposi/onal logic, first- order logic CS 4100/5100 Founda/ons of AI

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz )

Logic & Logic Agents Chapter 7 (& background)

Propositional and First-Order Logic

CS 4700: Foundations of Artificial Intelligence

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

CS:4420 Artificial Intelligence

Logic III. Introduction to Artificial Intelligence CSE 150

First-Order Logic. Chapter 8

CS 771 Artificial Intelligence. Propositional Logic

Logical Agents. Chapter 7

Kecerdasan Buatan M. Ali Fauzi

KR: First Order Logic - Intro

Introduction to Intelligent Systems

Introduction to Intelligent Systems

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

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

Deliberative Agents Knowledge Representation I. Deliberative Agents

Outline. Inference in first- order logic: just a taste. Universal instan8a8on (UI) Inference with Quan8fiers. Reduc8on to proposi8onal inference

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Chapter 8 First Order Logic

First-Order Logic. Chapter 8

AI Programming CS S-09 Knowledge Representation

Artificial Intelligence

Logical Agent & Propositional Logic

CS 730/730W/830: Intro AI

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

Agents that reason logically

Proof Methods for Propositional Logic

Logical Agents. Propositional Logic [Ch 6] Syntax, Semantics, Entailment, Derivation. Predicate Calculus Representation [Ch 7]

Logical Agents (I) Instructor: Tsung-Che Chiang

CS 520: Introduction to Artificial Intelligence. Review

CS560 Knowledge Discovery and Management. CS560 - Lecture 3 1

Logical Agent & Propositional Logic

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

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

Predicate abstrac,on and interpola,on. Many pictures and examples are borrowed from The So'ware Model Checker BLAST presenta,on.

Logic and Reasoning. Foundations of Computing Science. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

First-Order Logic. Chapter 8

CS 188: Artificial Intelligence Spring 2007

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

First-Order Logic Chap8 1. Pros and Cons of Prop. Logic

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

Transcription:

Introduc)on to Ar)ficial Intelligence Lecture 9 Logical reasoning CS/CNS/EE 154 Andreas Krause

First order logic (FOL)! Proposi)onal logic is about simple facts! There is a breeze at loca)on [1,2]! First order logic is about facts involving! Objects: Numbers, people, loca)ons, )me instants,! Rela+ons: Alive, IsNextTo, Before,! Func+ons: MotherOf, BestFriend, SquareRoot, OneMoreThan,! Will be able to say:! IsBreeze(x); IsPit(x); IsNextTo(x,y) 2

FOL: Basic syntac)c elements! Constants: KingJohn, 1, 2,, [1,1], [1,2],,[n,n],! Variables: x, y, z,! Predicates: Brother, >, =,! Func)ons: LeaLegOf, MotherOf, Sqrt,! Connec)ves:! Quan)fiers:! Constant, predicates and func)ons are mere symbols (i.e., have no meaning on their own) 3

FOL Syntax: Atomic sentences A (variable- free) term is a! constant symbol or! k- ary func)on symbol: func+on(term 1,term 2,, term k ) Example: Le<LegOf(KingJohn) An atomic sentence is a predicate symbol applied to terms Example:! Brother(KingJohn, RichardLionheart)! IsNextTo([1,1],[1,2])! > (Length(Le<LegOf(KingJohn)), Length(Le<LegOf (RichardLionheart))) 4

Models in FOL! Much more complicated than in Proposi)onal Logic! Models contain! Set of objects (finite or countable)! Set of rela)ons between objects (map obj s to truth values)! Set of func)ons (map objects to other objects) and their interpreta)ons:! Mapping from constant symbols to model objects! Mapping from predicate symbols to model rela)ons! Mapping from func)on symbols to model func)ons! An atomic sentence predicate(term 1,term 2,, term k ) is true if the objects referred to by term 1,term 2,, term k are in the rela)on referred to by predicate 5

Quan)fiers! Allow variables in addi)on to constants! Sentences with free variables:! Quan)fiers bind free variables! Example:! All homeworks in 154 are hard is true if S(x) is true for all instan)a)ons of x (i.e., for each possible object in the model) is true if S(x) is true for at least one instan)a)on of x (i.e., for some object)! At least one of the 154 homeworks is hard 6

Proper)es of quan)fiers! Is the same as?! Is the same as?! Is the same as? 7

! Brothers are siblings Examples! Siblings is symmetric! A mother is somebody s female parent! A first cousin is a child of a parent s sibling 8

Equality: Special predicate! Reflexive, transi)ve and symmetric! Subs)tu)ng equal objects doesn t change value of expressions! All models need to sa)sfy these proper)es! Typically, just assume that model has an equality rela)on, and the interpreta)on of the = symbol refers to that rela)on 9

Wumpus world in FOL! Modeling percep)on! Proper)es of loca)ons! Squares are breezy near a pit 10

Modeling change! Facts hold only in certain situa)ons instead of! Can model using situa)on calculus! Add situa)on argument to each non- eternal predicate! E.g., t in! Model effects of ac)ons using Result func)on Result(a,s) is the situa)on that results from doing a in s! Effect axioms model changes due to ac)ons 11

The frame problem! In addi)on to modeling change, also need to model non- change! Need frame axioms that model non- change! The frame problem:! Number of frame axioms can be large! Causes problems in inference 12

Solving the frame problem! Successor state axioms: For each non- eternal predicate, model how it is affected or not affected by ac)ons! P is true [an ac)on made P true or P is already true and no ac)on made it false]! Example for holding the gold 13

Planning using FOL! Knowledge base (KB) contains all known facts! Successor state axioms! Proper)es of loca)ons / percep)on! Ini)al condi)ons: P ercept([nosmell, Breeze, NoGlitter],S 0 )! Use inference to find whether, e.g.,! Agent can obtain gold: Example response:! Agent can safely move to [2,2] 14

Inference in FOL! Much more complicated then in proposi)onal logic! Two approaches! Proposi)onaliza)on: Convert to proposi)onal formula and use proposi)onal inference! Liaed inference: Syntac)cally manipulate proposi)onal sentences directly 15

Proposi)onaliza)on! Create a proposi)onal symbol for each atomic sentence! Inferring proposi)onal sentences by grounding universally quan)fied variables! Replace existen)al quan)fier by introducing new constants 16

Problems with proposi)onaliza)on! May need to create lots of unnecessary symbols! More importantly: Number of symbols could be infinite! If KB involves func)ons, can build infinitely many terms Theorem (Herbrand 30) If a sentence α is entailed by a FOL KB, then there is a proof using only a finite subset of the proposi)onalized KB 17

Naïve algorithm for FOL using proposi)onaliza)on! Want to determine whether sentence α is entailed by KB! Can enumerate all finite subsets PKB 1, PKB 2, of the proposi)onalized knowledge base KB α For i = 1 to If PKB i is unsa)sfiable, e.g., using proposi)onal resolu)on: break and return true! If above algorithm stops aaer a finite number of steps! If it will never stop! This is intrinsic: FOL is semi- decidable 18

Liaed inference! Want to operate on FOL sentences directly! Suppose we know and! Liaed inference allows to infer without instan)a)ng 19

Generalized modus ponens! Let and be FOL sentences! Suppose where is a subs)tu)on and its applica)on! E.g.: Then the following inference is sound: Can use in a generaliza)on of forward/backward chaining However, GMP is not complete 20

Generaliza)on resolu)on! Can also develop a liaed variant of resolu)on! Details in reading! Generalized resolu)on is sound and refuta)on- complete Can prove if Cannot prove if 21

Other logics Language Ontological commitment Epistemological commitment Proposi6onal logic facts true/false/unknown First order logic facts, objects, rela)ons true/false/unknown Higher order logic Temporal logic facts, objects, rela)ons, rela)ons of rela)ons, true/false/unknown facts, objects, rela)ons, )mes true/false/unknown Fuzzy logic facts degree of truth in [0,1] Bayesian networks (up next) facts belief in probability of truth Bayesian logic / Markov Logic Networks facts, objects, rela)ons belief in probability of truth 22