1. Trang chủ
  2. » Giáo án - Bài giảng

trí tuệ nhân tạo cao hoàng trứ chương ter7 1 using logic sinhvienzone com

63 72 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

om C ne nh Vi en Zo Using Logic Si Chapter SinhVienZone.com https://fb.com/sinhvienzonevn .C om Using Propositional Logic ne Representing simple facts Si It is windy WINDY nh Vi en It is sunny SUNNY Zo It is raining RAINING If it is raining, then it is not sunny RAINING  SUNNY Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com April, 2012 https://fb.com/sinhvienzonevn .C ne • Logical constants: true, false om Propositional Logic Syntax Zo • Propositional symbols: P, Q, … nh Vi en • Logical connectives: , , , ,  • Sentences (formulas): Logical constants Proposition symbols If  is a sentence, then so are  and () If  and  are sentences, then so are   ,   ,   , and    Si – – – – Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com April, 2012 https://fb.com/sinhvienzonevn om Propositional Logic Semantics ne C • Interpretation: propositional symbol  true/false false false false true true false true true PQ PQ PQ PQ true false false true true true false true true false false false true false false false true true true true P nh Vi en Q Si P Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com Zo • The truth value of a sentence is defined by the truth table 4 April, 2012 https://fb.com/sinhvienzonevn om Propositional Logic Semantics ne C • Satisfiable: true under an interpretation (P  Q)  Q ((P  Q)  Q)  P nh Vi en Q P  P false false false false true false true false false true true false false true true true true false false true satisfiable valid Si P unsatisfiable Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com Zo • Valid: true under all interpretations April, 2012 https://fb.com/sinhvienzonevn om Propositional Logic Semantics C • Model: an interpretation under which the sentence is true Zo  P nh Vi en PQ Si PQ  P Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com PQ ne PQ  Q PQ  Q  PQ April, 2012 https://fb.com/sinhvienzonevn om Propositional Logic Semantics false true PQ P  Q, P false true false true true false false false false true true true Si false Q nh Vi en P true Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com Zo ne  is a logical consequence of KB C • Entailment: KB =  iff every model of KB is a model of  {P  Q, P} = Q April, 2012 https://fb.com/sinhvienzonevn om Propositional Logic Semantics Q PQ false false true nh Vi en Zo P false true P  Q P  Q  P  Q true true true true false false false true true true Si true ne C • Equivalence:    iff  =  and  =  Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com April, 2012 https://fb.com/sinhvienzonevn ne Zo • Theorems: –  =  iff    is valid C om Propositional Logic Semantics nh Vi en KB =  can be proved by validity of KB   –  =  iff    is unsatisfiable Si KB =  can be proved by refutation of KB   Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com April, 2012 https://fb.com/sinhvienzonevn .C om Using Propositional Logic ne • Theorem proving is decidable Si nh Vi en Zo • Cannot represent objects and quantification Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 10 April, 2012 https://fb.com/sinhvienzonevn .C om Resolution in Predicate Logic Convert all the propositions of KB to clause form (S) Negate  and convert it to clause form Add it to S Repeat until a contradiction is found: Zo ne nh Vi en a Select two clauses (   p(t1, t2, …, tn)) and (  p(t’1, t’2, …, t’n)) b  = mgu(p(t1, t2, …, tn), p(t’1, t’2, …, t’n)) Si c Add the resolvent (  ) to S Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 49 April, 2012 https://fb.com/sinhvienzonevn .C om Resolution in Predicate Logic ne Example: Zo KB = {P(a), "x: (P(x)  Q(x))  R(x), "y: (S(y)  T(y))  Q(y), T(a)} Si nh Vi en  = R(a) Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 50 April, 2012 https://fb.com/sinhvienzonevn .C om Example Marcus was a man Marcus was a Pompeian All Pompeians were Romans Caesar was a ruler All Pompeians were either loyal to Caesar or hated him Every one is loyal to someone People only try to assassinate rulers they are not loyal to Marcus tried to assassinate Caesar Si nh Vi en Zo ne Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 51 April, 2012 https://fb.com/sinhvienzonevn .C om Example Man(Marcus) Pompeian(Marcus) "x: Pompeian(x)  Roman(x) ruler(Caesar) "x: Roman(x)  loyalto(x, Caesar)  hate(x, Caesar) "x: $y: loyalto(x, y) "x: "y: person(x)  ruler(y)  tryassassinate(x, y) Si nh Vi en Zo ne  loyalto(x, y) tryassassinate(Marcus, Caesar) Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 52 April, 2012 https://fb.com/sinhvienzonevn .C om Example ne Prove: Si nh Vi en Zo hate(Marcus, Caesar) Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 53 April, 2012 https://fb.com/sinhvienzonevn .C om Question Answering ne When did Marcus die? Zo Whom did Marcus hate? nh Vi en Who tried to assassinate a ruler? What happen in 79 A.D.? Si Did Marcus hate everyone? Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 54 April, 2012 https://fb.com/sinhvienzonevn .C om Soundness and Completeness Zo ne • Soundness of a reasoning algorithm/system R: Si nh Vi en if KB derives  using R, then KB =  Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 55 April, 2012 https://fb.com/sinhvienzonevn .C om Soundness and Completeness Zo ne • Completeness of a reasoning algorithm/system R: Si nh Vi en if KB = , then KB derives  using R Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 56 April, 2012 https://fb.com/sinhvienzonevn .C om Soundness and Completeness Si nh Vi en Zo ne Resolution algorithm is sound and complete Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 57 April, 2012 https://fb.com/sinhvienzonevn .C om Soundness and Completeness ne • In general: Zo – Soundness: any returned answer is a correct answer Si nh Vi en – Completeness: all correct answers are returned Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 58 April, 2012 https://fb.com/sinhvienzonevn om Programming in Logic ne C PROLOG: Zo • Only Horn sentences are acceptable nh Vi en A  B1, B2, …, Bm  A  B1  B2  …  Bm Si A, Bi: atoms Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 59 April, 2012 https://fb.com/sinhvienzonevn om Programming in Logic ne C PROLOG: nh Vi en test  P(x, x) Zo • The occur-check is omitted from the unification: unsound Si P(x, f(x)) Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 60 April, 2012 https://fb.com/sinhvienzonevn om Programming in Logic C PROLOG: Zo P(x, x) nh Vi en P(x, y)  Q(x, y) ne • Backward chaining with depth-first search: incomplete Si Q(x, y)  Q(y, x) Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 61 April, 2012 https://fb.com/sinhvienzonevn om Programming in Logic ne C PROLOG: nh Vi en A  B, C Zo • Unsafe cut: incomplete A B  D, !, E Si D  B, C  D, !, E, C  !, E, C Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 62 April, 2012 https://fb.com/sinhvienzonevn om Programming in Logic ne C PROLOG: Si nh Vi en Zo • Negation as failure: P if fails to prove P Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 63 April, 2012 https://fb.com/sinhvienzonevn ... Vi en Zo ne Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 16 April, 2 012 https://fb.com/sinhvienzonevn Marcus was a man ne .C om Using Predicate Logic Si nh Vi en Zo man(Marcus) Cao Hoang... SinhVienZone.com 17 April, 2 012 https://fb.com/sinhvienzonevn Marcus was a Pompeian ne .C om Using Predicate Logic Si nh Vi en Zo Pompeian(Marcus) Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com 18 April,... p(x) Cao Hoang Tru CSE Faculty - HCMUT SinhVienZone.com $x: married(x) 13 April, 2 012 https://fb.com/sinhvienzonevn .C om Predicate Logic Syntax ne • Sentences: Zo – Atomic sentences: p(t1, t2,

Ngày đăng: 30/01/2020, 23:10

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN