1/19 Inference in first-order logic Chapter 9- Part2 Modified by Vali Derhami.

Slides:



Advertisements
Similar presentations
Inference Rules Universal Instantiation Existential Generalization
Advertisements

Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
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.
1 Resolution 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.
Inference in FOL All rules of inference for propositional logic apply to first-order logic We just need to reduce FOL sentences to PL sentences by instantiating.
First-Order Logic Inference
1 FOL CS 331/531 Dr M M Awais Unification “It is an algorithm for determining the substitutions needed to make two predicate calculus expressions match”
1 FOL Resolution based Inferencing Resolution based rules studied earlier can lead to inferences, rules such as modus ponen, unit resolution etc… Other.
CSCE 580 Artificial Intelligence Ch.9: Inference in First-Order Logic
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Cooperating Intelligent Systems Inference in first-order logic Chapter 9, AIMA.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Inference in First-Order Logic
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: FOL Inference (Reading R&N: Chapter 8)
Cooperating Intelligent Systems Inference in first-order logic Chapter 9, AIMA.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Fall 2004.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2005.
Start with atomic sentences in the KB and apply Modus Ponens, adding new atomic sentences, until “done”.
1 Inference in First-Order Logic. 2 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward chaining.
Cooperating Intelligent Systems Inference in first-order logic Chapter 9, AIMA.
CHAPTER 9 Oliver Schulte Inference in First-Order Logic.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Inference in First-Order Logic CS 271: Fall 2007 Instructor: Padhraic Smyth.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 26, 2012.
Logic review A summary of chapters 7, 8, 9 of Artificial Intelligence: A modern approach by Russel and Norving.
1 CS 2710, ISSP 2160 Chapter 9 Inference in First-Order Logic.
Inference in first-order logic I CIS 391 – Introduction to Artificial Intelligence AIMA Chapter (through p. 278) Chapter 9.5 (through p. 300)
1 Inference in first-order logic Chapter 9. 2 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
First-Order Logic and Plans Reading: C. 11 (Plans)
Inference in first- order logic. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward chaining.
Computing & Information Sciences Kansas State University Friday, 29 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 16 of 42 Friday, 29 September.
Inference in First-Order Logic 부산대학교 전자전기컴퓨터공학과 인공지능연구실 김민호
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
1 Inference in First-Order Logic CS 271: Fall 2009.
5/18/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 13, 5/18/2005 University of Washington, Department of Electrical Engineering Spring.
1 First Order Logic (Syntax, Semantics and Inference)
An Introduction to Artificial Intelligence – CE Chapter 9 - Inference in first-order logic Ramin Halavati In which we define.
1 First Order Logic CS 171/271 (Chapters 8 and 9) Some text and images in these slides were drawn from Russel & Norvig’s published material.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Inference in first-order logic
Inference in First Order Logic. Outline Reducing first order inference to propositional inference Unification Generalized Modus Ponens Forward and backward.
First-Order Logic Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
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.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Presented By S.Yamuna AP/CSE
Inference in first-order logic
Logical Agents Chapter 7.
Inference in First-Order Logic
Knowledge Representation & Reasoning
Introduction to Artificial Intelligence
Inference in First-Order Logic
Inference in first-order logic part 1
Example of Knowledge Base
Artificial intelli-gence 1:Inference in first-order logic
Artificial Intelligence
Introduction to Artificial Intelligence
Artificial intelligence: Inference in first-order logic
Artificial Intelligence Inference in First Order Logic
Notes 9: Inference in First-order logic
First Order Logic: Logical Inference
Inference in first-order logic
Inference in first-order logic part 1
First-Order Logic Inference
First-Order Logic Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

1/19 Inference in first-order logic Chapter 9- Part2 Modified by Vali Derhami

2/19 Backward chaining algorithm SUBST(COMPOSE(θ 1, θ 2 ), p) = SUBST(θ 2, SUBST(θ 1, p)) ترکیب جایگزینی معادل تاثیر به کارگیری هر یک از جایگزینها به نوبت است

3/19 Backward chaining example

4/19 Backward chaining example

5/19 Backward chaining example

6/19 Backward chaining example

7/19 Backward chaining example

8/19 Backward chaining example

9/19 Backward chaining example

10/19 Backward chaining example

11/19 Properties of backward chaining Depth-first recursive proof search: space is linear in size of proof Incomplete due to infinite loops (even for Datalog) –  fix by checking current goal against every goal on stack Inefficient due to repeated subgoals (both success and failure) –  fix using caching of previous results (extra space) (جوابهای هدفهای فرعی در حین تولید نگهداری، در هنگام تکرار هدفهای فرعی از انها استفاده) Widely used for logic programming

12/19 Logic programming: Prolog Algorithm = Logic + Control Basis: backward chaining with Horn clauses Uses uppercase letters for variables and lowercase for constants. Clauses are written with the head preceding the body; ": -" is used for left- implication, commas separate literals in the body, and ‘.’ for end of a sentence. Widely used in Europe, Japan Program = set of clauses = head :- literal 1, … literal n. criminal(X) :- american(X), weapon(Y), sells(X,Y,Z), hostile(Z). Depth-first, left-to-right backward chaining Built-in predicates for arithmetic etc., e.g., X is Y*Z+3

13/19 Prolog Built-in predicates that have side effects (e.g., input and output predicates, assert/retract predicates) Closed-world assumption ("negation as failure") –e.g., given alive(X) :- not dead(X). –alive(joe) succeeds if dead(joe) fails Appending two lists to produce a third: append([],Y,Y). append([X|L],Y,[X|Z]) :- append(L,Y,Z). query: append(A,B,[1,2]) ? answers: A=[] B=[1,2] A=[1] B=[2] A=[1,2] B=[]

14/19 Resolution: brief summary Full first-order version: l 1  ···  l k, m 1  ···  m n ( l 1  ···  l i-1  l i+1  ···  l k  m 1  ···  m j-1  m j+1  ···  m n )θ where Unify ( l i,  m j ) = θ. The two clauses are assumed to be standardized apart so that they share no variables. For example:  Rich(x)  Unhappy(x) Rich(Ken) Unhappy(Ken) with θ = {x/Ken} Apply resolution steps to CNF(KB   α); complete for FOL

15/19 Conversion to CNF Everyone who loves all animals is loved by someone:  x [  y Animal(y)  Loves(x,y)]  [  y Loves(y,x)] 1. Eliminate biconditionals and implications  x [  y  Animal(y)  Loves(x,y)]  [  y Loves(y,x)] 2. Move  inwards:  x p ≡  x  p,   x p ≡  x  p  x [  y  (  Animal(y)  Loves(x,y))]  [  y Loves(y,x)]  x [  y  Animal(y)   Loves(x,y)]  [  y Loves(y,x)]  x [  y Animal(y)   Loves(x,y)]  [  y Loves(y,x)]

16/19 Conversion to CNF contd. 3.Standardize variables: each quantifier should use a different one  x [  y Animal(y)   Loves(x,y)]  [  z Loves(z,x)] 4.Skolemize: a more general form of existential instantiation. Each existential variable is replaced by a Skolem function of the enclosing universally quantified variables:  x [Animal(F(x))   Loves(x,F(x))]  Loves(G(x),x) 5.Drop universal quantifiers: [Animal(F(x))   Loves(x,F(x))]  Loves(G(x),x) 6.Distribute  over  : [Animal(F(x))  Loves(G(x),x)]  [  Loves(x,F(x))  Loves(G(x),x)]

17/19 Resolution proof: definite clauses R1: American(x)  Weapon(y)  Sells(x,y,z)  Hostile(z)  Criminal(x) R2: Missile(x1)  Owns(Nono,x1)  Sells(West,x1,Nono) R3: Missile(x2)  Weapon(x2) R4: Enemy(x3,America)  Hostile(x3) Owns(Nono,M1) Missile(M1) American(West) Enemy(Nono,America)

18/19 Resolution proof: definite clauses R1: American(x)  Weapon(y)  Sells(x,y,z)  Hostile(z)  Criminal(x) R2: Missile(x1)  Owns(Nono,x1)  Sells(West,x1,Nono) R3: Missile(x2)  Weapon(x2) R4: Enemy(x3,America)  Hostile(x3) Owns(Nono,M1) Missile(M1) American(West) Enemy(Nono,America)

19/19 تمارین فصل 9: 4، 9، 18 و سوالات تستی