فصل نهم استدلال در منطق مرتبه اول Session 5

Slides:



Advertisements
Similar presentations
Inference in first-order logic
Advertisements

Inference in First-Order Logic
Artificial Intelligence 8. The Resolution Method
Inference in first-order logic
First-Order Logic.
Inference Rules Universal Instantiation Existential Generalization
ITCS 3153 Artificial Intelligence Lecture 15 First-Order Logic Chapter 9 Lecture 15 First-Order Logic Chapter 9.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Automated Deduction resolution (Otter) backward-chaining (Prolog)
Logical Inference 1 introduction Chapter 9 Some material adopted from notes by Andreas Geyer-Schulz,, Chuck Dyer, and Mary Getoor.
First-Order Logic ECE457 Applied Artificial Intelligence Spring 2007 Lecture #7.
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”
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9.
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
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.
1 Inference in First-Order Logic. 2 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward chaining.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Inference in First-Order Logic CS 271: Fall 2007 Instructor: Padhraic Smyth.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
CS 416 Artificial Intelligence Lecture 12 First-Order Logic Chapter 9 Lecture 12 First-Order Logic Chapter 9.
March 14, 2006AI: Chapter 9: Inference in First- Order Logic 1 Artificial Intelligence Chapter 9: Inference in First- Order Logic Michael Scherger Department.
Inference in FOL Compared to predicate logic, more abstract reasoning and specific conclusions.
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,
Inference in First-Order Logic 부산대학교 전자전기컴퓨터공학과 인공지능연구실 김민호
Computing & Information Sciences Kansas State University Lecture 13 of 42 CIS 530 / 730 Artificial Intelligence Lecture 13 of 42 William H. Hsu Department.
The AI War LISP and Prolog Basic Concepts of Logic Programming
Computing & Information Sciences Kansas State University Lecture 14 of 42 CIS 530 / 730 Artificial Intelligence Lecture 14 of 42 William H. Hsu Department.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 23 Friday, 17 October.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 15 of 41 Friday 24 September.
1 Inference in First-Order Logic CS 271: Fall 2009.
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.
An Introduction to Artificial Intelligence – CE Chapter 9 - Inference in first-order logic Ramin Halavati In which we define.
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
Inference in First Order Logic. Outline Reducing first order inference to propositional inference Unification Generalized Modus Ponens Forward and backward.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
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.
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.
Inference in first-order logic
Inference in First-Order Logic
Logical Inference 1 introduction
Topics Covered since 1st midterm…
Prerequisite Skills VOCABULARY CHECK 1
Horn Clauses and Unification
Forward chaining Slides Obtained From Russel & Norvig’s Website.
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
הקורס להכשרת מטפלים התנהגותיים ABA
Artificial intelligence: Inference in first-order logic
Artificial Intelligence Inference in First Order Logic
First Order Logic: Logical Inference
Inference in first-order logic
Artificial Intelligence
Inference in first-order logic part 1
CSE 4705 Artificial Intelligence
Horn Clauses and Unification
First-Order Logic Inference
Evaluate x = 3; 2x + 6.
Presentation transcript:

فصل نهم استدلال در منطق مرتبه اول Session 5 By: Nematzadeh

اهداف ۱- مفاهیم مرتبط با استدلال ۲-یکسان سازی ۳- فرم نرمال عطفی در منطق مرتبه اول

استدلال در منطق مرتبه اول Chapter 9 Universal instantiation نمونه سازی عمومی ‌ متغیر جمله مقدار ثابت=g با نمومنه سازی عمومی‌ به حالت خاصی‌ از جمله عمومی‌ میرسیم

Existential instantiation نمونه سازی وجودی نمونه سازی وجودینمونه سازی وجودی k= مقدار ثابت

فایده نمونه سازی از طریق نمونه سازی عمومی‌ و نمونه سازی وجودی منطق مرتبه اول خود به خود به فرم منطق گزاره‌ای در میاید. اگر چنین شود ما میتونیم از ایده رزولوشن  استفاده کنیم ا مساله را حل کنیم

ایراد نمونه سازی نمونه سازی به ۲ دلیل ارزش پیاده سازی ندارد: ۱- به خاطر وجود توابع تو در تو میتواند مقدار ترم‌ها میتواند بی‌ نهایت بر تکرار شود ۲ - ممکن است جملات نامربوط زیادی حاصل شود که به درد ما نمیخورد   این روش کلا به درد نمیخورد

Unification یکسان سازی آلفا و بتا جمله هستند جایگزینی فقط به جای متغیر صورت می‌گیرد به جای متغیر میتونیم یا ثابت یا تابع یا متغیر قرار دهیم

Unification یکسان سازی برای یکسان سازی دو جمله باید سمبل‌های گذاره‌ای‌شان یکی‌ باشد، ضمنا باید تعداد ترم‌ها نیز با هم برابر باشد

Unification یکسان سازی

Unification یکسان سازی در صورت یکسان سازی برای یک متغیر،  آن یکسان سازی به تمام ترم‌های مابعد چه در جمله اول چه در جمله دوم اعمال میشود

Unification یکسان سازی

Most General Unifier

الگوریتم یکسان سازی

خلاصه الگوریتم صفحه قبل به زبان فارسی ۱- ابتدا سمبل‌های گزاره‌ای ۲ جمله ورودی را با هم مقایسه می‌کنیم، اگر برابر نبودند، غیر قابل یکسان سازی است، اگر برابر بودند ۲- ترم به ترم (از چپ به راست) یکسان سازی را انجام میدهیم( فراخوانی بازگشتی داریم) (ترم میتواند یک متغیر/ ثابت/ تابع باشد) ۳- اگر یکی‌ از ۲ طرف متغیر باشد، طرف دیگر هر چیزی بود جای آن قرار می‌گیرد ۴- اما اگر هر ۲ طرف تابع بود، باید تابع‌ها برابر (هم نام) باشند تا یکسان سازی شکست نخورد. ورودی هر تابع از از نوع ترم است. یکسان سازی را برای ورودی‌های هر تابع نیز به صورت بازگشتی انجام میدهیم

الگوریتم یکسان سازی ۱- اگر در یکسان سازی در یک جمله یکی‌ از ترم‌ها (ترمi ) متغیر بود، ترم معادل در جمله بعدی هر چی‌ بود جایگزین آن میشود و تمامی‌ ترم‌های i+1 در دو جمله اگر آن متغیر تکرار شد مقدار آن باید قرار گیرد ۲- اگر در یک جمله متغیر داشته باشیم و ترم معادل در جمله دوم یک تابع باشد به طوری که متغیرx و تابع g(x)باشد امکان یکسان سازی نیست ( شکست می‌خوریم) چون وقتی‌ قرار است به جایx , g(x)بگذاریم به جای xدرونg(x) نیزg(x) (g(gx))گذشته میشود و این عمل به طور بازگشتی تکرار میشود و وارد یک حلقه بی‌ نهایت می‌شویم OCCUR-CHECK <==> باید متغیر‌های یکسان را تغییر نام دهیم

استدلال رو به جلو و رو به عقب میتوانیم از این ۲ استدلال برای استنتاج در منطق مرتبه اول همانند منطق گزاره‌ای استفاده کنیم با این تفاوت که در منطق گزاره‌ای از مدس پننز استفاده میکردیم اینجا از مدس پننز تعمیم یافته استفاده می‌کنیم)یکسان سازی( در اینجا نیز جملات باید به شکل هورن صریح باشند

مثال

تبدیل به فرم FOL جملات همه به فرم هورن صریح هستند The country Nono, an enemy of America Enemy (Nono, America)

Forward chaining

Forward chaining

Forward chaining

Backward chaining

Backward chaining

Backward chaining

Backward chaining

Backward chaining

Backward chaining

Resolution دومین روش رزولوشن است فرقش با منطق گزاره‌ای این است که در اینجا رزولوشن تعمیم یافته به همراه یکسان سازی استفاده می‌کنیم ضمنا CNF سازی هم نسبت به منطق گزاره‌ای اندکی‌ تغییر دارد

Resolution رزولوشن تعمیم یافته Unify (lk,-lk) = θ L1 ˅ l2 ˅ … ˅ lk , -lk ˅…lm L1 ˅ l2 ˅ … ˅ lk-1 ˅ lk+1 ˅…lm

CNF

CNF 6