Ch. 9 – FOL Inference Supplemental slides for CSE 327 Prof. Jeff Heflin.

Slides:



Advertisements
Similar presentations
Artificial Intelligence 8. The Resolution Method
Advertisements

Some Prolog Prolog is a logic programming language
First-Order Logic.
Inference Rules Universal Instantiation Existential Generalization
Standard Logical Equivalences
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Artificial Intelligence Inference in first-order logic Fall 2008 professor: Luigi Ceccaroni.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Ch. 19 – Knowledge in Learning Supplemental slides for CSE 327 Prof. Jeff Heflin.
First-Order Logic ECE457 Applied Artificial Intelligence Spring 2007 Lecture #7.
Ch. 2 – Intelligent Agents Supplemental slides for CSE 327 Prof. Jeff Heflin.
Ch. 18 – Learning Supplemental slides for CSE 327 Prof. Jeff Heflin.
Ch. 8 – First Order Logic Supplemental slides for CSE 327 Prof. Jeff Heflin.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
Inference in First-Order Logic
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Fall 2004.
Modelling planning problems using PDDL
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2005.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Inference in First-Order logic Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
Ch. 14 – Probabilistic Reasoning Supplemental slides for CSE 327 Prof. Jeff Heflin.
Logical Inference 2 rule based reasoning
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Supplemental slides for CSE 327 Prof. Jeff Heflin
1 Inference in First Order Logic CS 171/271 (Chapter 9) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Ch. 14 – Probabilistic Reasoning Supplemental slides for CSE 327 Prof. Jeff Heflin.
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
ECE457 Applied Artificial Intelligence R. Khoury (2007)Page 1 Implication Truth Table If α is true, then β must be true for the implication to be true.
Inference in First Order Logic. Outline Reducing first order inference to propositional inference Unification Generalized Modus Ponens Forward and backward.
Ch. 7 – Logical Agents Supplemental slides for CSE 327 Prof. Jeff Heflin.
Backward chaining Assume the same representation of rules as in forward chaining, i.e. If is true, is true, … is true Then is true. Rule interpretation.
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
1 Final Exam Review CS 171/ Coverage Problem Solving and Searching Chapters 3,4,6 Logic Chapters 7,8,9 LISP Only those sections covered in the slides.
Ch. 4 – Informed Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Ch. 7 – Logical Agents Supplemental slides for CSE 327 Prof. Jeff Heflin.
Prolog Fundamentals. 2 Review Last Lecture A Prolog program consists of a database of facts and rules, and queries (questions). –Fact:.... –Rule:... :-....
For Friday Finish chapter 9 Program 1 due. Program 1 Any questions?
Inference in First-Order Logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
1 Chaining in First Order Logic CS 171/271 (Chapter 9, continued) Some text and images in these slides were drawn from Russel & Norvig’s published material.
EA C461 Artificial Intelligence
Logical Inference 2 Rule-based reasoning
Inference in first-order logic
Recursive stack-based version of Back-chaining using Propositional Logic
Ch. 2 – Intelligent Agents
Supplemental slides for CSE 327 Prof. Jeff Heflin
Logical Inference 2 Rule-based reasoning
Forward chaining Slides Obtained From Russel & Norvig’s Website.
Forward Chaining (propositional) Recursive stack-based version of Back-chaining using Propositional Logic could be modified to handle... variables.
Inference in first-order logic part 1
Artificial Intelligence
Jess Architecture Diagram WORKING MEMORY INFERENCE ENGINE EXECUTION ENGINE PATTERN MATCHER RULE BASE Here you can see how all the parts fit.
Supplemental slides for CSE 327 Prof. Jeff Heflin
Artificial Intelligence
Inference in first-order logic part 1
Ch. 19 – Knowledge in Learning
Supplemental slides for CSE 327 Prof. Jeff Heflin
Supplemental slides for CSE 327 Prof. Jeff Heflin
Supplemental slides for CSE 327 Prof. Jeff Heflin
Supplemental slides for CSE 327 Prof. Jeff Heflin
Ch. 2 – Intelligent Agents
Supplemental slides for CSE 327 Prof. Jeff Heflin
Supplemental slides for CSE 327 Prof. Jeff Heflin
Supplemental slides for CSE 327 Prof. Jeff Heflin
Presentation transcript:

Ch. 9 – FOL Inference Supplemental slides for CSE 327 Prof. Jeff Heflin

Backward Chaining function FOL-BC-ASK (KB, goals,  ) returns a set of substitutions local answers, a set of substitutions, initially empty if goals is empty then return {  } q’  SUBST( ,FIRST(goals)) for each sentence r in KB where STANDARDIZE-APART(r) = (p 1  …  p n  q) and  ’  UNIFY(q,q’) succeeds new_goals  PREPEND([p 1,…,p n ], REST(goals)) answers  FOL-BC-ASK(KB, new_goals, COMPOSE(  ’,  ))  answers return answers From Figure 9.6, p. 288

Backward Chaining Example Set of sentences: S 1 :  x 1,y 1 child(x 1,y 1 )  parent(y 1,x 1 ) S 2 :  x 2,y 2 parent(x 2,y 2 )  female(x 2 )  mother(x 2,y 2 ) S 3 : child(Lisa,Homer) S 4 : child(Lisa,Marge) S 5 : female(Marge) Note: variables have already been standardized apart using subscripts Query:  x mother(x,Lisa)

Backward Chaining Search Tree mother(x 0,Lisa) parent(x 0,Lisa), female(x 0 ) child(Lisa,x 0 ), female(x 0 ) female(homer)female(marge) match S 4  ’={x 0 /Marge} match rule S 2  ’={x 2 /x 0, y 2 /Lisa} match rule S 1  ’={y 1 /x 0, x 1 /Lisa} match S 3  ’={x 0 /Homer} no matches answers={} (FAIL!) matches S 5  ’={ x 0 /Marge}  answers= { x 0 /Marge}

Forward Chaining function FOL-FC-ASK (KB,  ) returns a substitution or false local new, the new sentences inferred on each iteration repeat until new is empty new  {} for each sentence r in KB do (p 1  …  p n  q )  STANDARDIZE-APART(r) for each  such that SUBST( , p 1  …  p n )= SUBST( , p 1 ’  …  p n ’) for some p 1 ’,…, p n ’ in KB q’  SUBST( ,q) if q’  is not a renaming of some sentence already in KB or new then do add q’ to new   UNIFY(q’,  ) if  is not fail then return  add new to KB return answers From Figure 9.3, p. 282