DOC PREVIEW
Stanford CS 157 - Lecture 14 Epilog

This preview shows page 1-2-17-18-19-35-36 out of 36 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

EpilogOverviewRule FormPremisesConclusionsBackward ChainingExampleIs Art the Grandparent of Coe?Variable Length ListsList Membership ExampleNon-Horn ExampleSlide 12Answer ExtractionAnswer Extraction RuleSlide 15Who Are the Grandchildren of Art?Troubling ExampleMultiple Goal RuleSlide 19Ease of Understanding of Proof ProcessSlide 21Search SpaceSlide 23Breadth First SearchDepth First SearchTime ComparisonSlide 27Space ComparisonIterative DeepeningSlide 30Slide 31General ResultCaching MotivationCachingBenefits of DF / ID SearchRelated SystemsEpilogComputational Logic Lecture 14Michael Genesereth Autumn 20072OverviewEpilog is a theorem prover for Relational Logic. It is sound and complete. It is at least as efficient as Model Elimination, and it is arguably more efficient. It is somewhat more intuitive than ordinary Resolution.Features: Rule Form instead of Clausal Form Backward Chaining variant of the ME rule Iterative Deepening rather than Breadth-First Search3Rule FormRule Form is the same as clausal form except that clauses are expressed using “rule” syntax rather than set notation.There are two cases. Premise form is used for premises. Question form is used for desired conclusions.4PremisesPremises are expressed as rules.NB: ,1,…,n is equivalent to (  1  …  n). € 〈 p〉 p ⇐ p :−〈¬p〉 ¬ p ⇐ ¬ p :−〈r,¬ p,¬ q〉 r ⇐ p ∧q r :−p,q5ConclusionsConclusions are expressed as questions.Note that 1,…,n is equivalent to (1…n).Note that (1…n) is equivalent to (1…n).〈 p〉 ¬p?¬〈 p〉 p?¬〈 p,¬q,r〉 p∧q∧¬r?6Backward ChainingBackward Chaining is the same as reduction except that it works on rule form rather than clausal form.ϕ ⇐ ϕ1∧...∧ϕmψ ∧ψ1∧...∧ψn?ϕ1∧...∧ϕm∧[ψ ]∧ψ1∧...∧ψn?σwhere σ =mgu(ϕ,ψ )Reduced literals need be retained only for non-Horn premises. Cancellation and Dropping are analogous.7Example1. m⇐ Premise2. p⇐ m Premise3. q⇐ m Premise4. r ⇐ p∧q Premise5. r? Goal6. p∧q? 4,57. m∧q? 2,68. q? 1,79. m? 3,810. ? 1,98Is Art the Grandparent of Coe?€ 1. p(art,bob) Premise2. p(art,bud) Premise3. p(bob,cal) Premise4. p(bud,coe) Premise5. g(x,z) ⇐ p(x, y)∧p(y, z) Premise6. g(art, z)? Goal7. p(art, y)∧p(y, z)? 5,68. p(bud, z)? 2, 79. ⊥ 4,89Variable Length ListsExample[a,b,c,d]Representation as Termcons(a,cons(b,cons(c,cons(d,nil))))Shorthand(a . (b . (c . (d . nil))))Shorthand[a,b,c,d]a b c d10List Membership Example1. member(x, nil) Premise2. member(x, (y . z))  member(x, z) Premise3. member(c, (a . (b . (c . nil))))? Goal4. member(c, (b . (c . nil)))? 2, 35. member(c, (c . nil))? 2, 46. ? 1, 511Non-Horn Example p  q p  qp  q p  q12Non-Horn Example9. p∧q? Goal10. ¬q∧[p]∧q? 1,911. ¬p∧[¬q]∧[p]∧q? 4,1012. [¬q]∧[p]∧q? 1113. [p]∧q? 1214. q? 1315. p∧[q]? 6,1416. ¬q∧[p]∧[q]? 1,1517. [p]∧[q]? 1618. [q]? 1719. ? 181. p⇐ ¬q p∨q2. q⇐ ¬p p∨q3. p⇐ q p∨¬q4. ¬q ⇐ ¬p p∨¬q5. ¬p⇐ ¬q ¬p∨q6. q⇐ p ¬p∨q7. ¬p⇐ q ¬(p∧q)8. ¬q ⇐ p ¬(p∧q)13Answer ExtractionTo extract answers start with definition of goal relation rather than question. € p(x, y)∧q(y, z)?goal(x,z) ⇐ p(x, y)∧q(y, z)14Answer Extraction Rule€ ϕ ⇐ ϕ1∧...∧ϕmγ ⇐ ψ ∧ψ1∧...∧ψn(γ ⇐ ϕ1∧...∧ϕm∧[ψ ]∧ψ1∧...∧ψn)σwhere σ = mgu(ϕ ,ψ )where γ is a goal literal15Example1. m(a,a) ⇐ Premise2. p(x,y) ⇐ m(x,y) Premise3. q(x,y) ⇐ m(x,y) Premise4. r(x,z) ⇐ p(x,y) ∧q(y,z) Premise5. goal(x,z)⇐ r(x,z) Goal6. goal(x,z)⇐ p(x,y)∧q(y,z) 4,57. goal(x,z)⇐ m(x,y)∧q(y,z) 2,68. goal(a,z) ⇐ q(a,z) 1,79. goal(a,z) ⇐ m(a,z) 3,810. goal(a,a) ⇐ 1,916Who Are the Grandchildren of Art?€ 1. p(art,bob) Premise2. p(art,bud) Premise3. p(bob,cal) Premise4. p(bud,coe) Premise5. g(x, z) :−p(x, y), p(y, z) Premise6. goal(z) :−g(art, z) Goal7. goal(z) :−p(x, y), p(y, z) 5,68. goal(z) :−p(bob, z) 1, 79. goal(cal) 3,810. goal(art) :−p(bud, z) 2, 711. goal(coe) 4,1017Troubling Example1. p(a) ⇐ ¬p(b) p(a)∨ p(b)2. p(b)⇐ ¬p(a) p(a)∨ p(b)3. goal(x)⇐ p(x) Goal4. ¬p(x) ⇐ ¬goal(x) Goal5. goal(a) ⇐ ¬p(b)∧[p(a)] 1,36. goal(a) ⇐ ¬goal(b)∧[¬p(b)]∧[p(a)] 4,518Multiple Goal Rule€ γ ⇐ ¬γ'∧ψ ∧ψ1∧...∧ψnγ∨γ'⇐ ψ ∧ψ1∧...∧ψnwhere γ and γ' are goal literals19Example1. p(a) ⇐ ¬p(b) p(a)∨ p(b)2. p(b)⇐ ¬p(a) p(a)∨ p(b)3. goal(x)⇐ p(x) Goal4. ¬p(x) ⇐ ¬goal(x) Goal5. goal(a) ⇐ ¬p(b)∧[p(a)] 1,36. goal(a) ⇐ ¬goal(b)∧[¬p(b)]∧[p(a)] 4,57. goal(a)∨goal(b) ⇐ [¬p(b)]∧[p(a)] 68. goal(a)∨goal(b) ⇐ [p(a)] 79. goal(a)∨goal(b) ⇐ 820Ease of Understanding of Proof Process1. m⇐ Premise2. p⇐ m Premise3. q⇐ m Premise4. r ⇐ p∧q Premise5. r? Goal6. p∧q? 4,57. m∧q? 2,68. q? 1,79. m? 3,810. ? 1,9Call: r? Call: p? Call: m? Exit: m Exit: p Call: q? Call: m? Exit: m Exit: qExit: rDepth-First Search supports tracing and debugging.Highly important on problems with many rules.21Ease of Understanding of Proof Process1. p(a)⇐2. p(b)⇐3. q(b)⇐4. r(x) ⇐ p(x)∧q(x)5. r(x)?Call: r(x)? Call: p(x)? Exit: p(a) Call: q(a)? Fail: q(a)? Redo: p(x)? Exit: p(b) Call: q(b)? Exit: q(b)?Exit: r(b)22Search SpaceQuestion:a?Premisesa  b a  c a  db  e c  g d  ib  f c  h d  j23Search SpaceachgdjibfeGiven the Input Restriction, the search space looks like a simple tree or graph.There are different schedules for searching the tree or graph.24Breadth First Searcha b c d e f g h i jachgdjibfeAdvantage: Finds shortest pathDisadvantage: Saves lots of intermediate information25Depth First Searchachgdjibfea b e f c g h d i jAdvantage: Small intermediate storageDisadvantage: Susceptible to garden pathsDisadvantage: Susceptible to infinite loops26Time ComparisonAnalysis for branching 2 and depth d and solution at depth kTime Best WorstDepth k 2d−2d−kBreadth 2k−12k−127Time ComparisonAnalysis for branching b and depth d and solution at depth k.Time Best WorstDepth kbd−bd−kb−1Breadthbk−1−1b−1+1bk−1b−128Space ComparisonWorst Case Space Analysis for search depth d and depth k.Space Binary GeneralDepth d (b−1)×(d −1) +1Breadth 2k−1bk−129Iterative DeepeningRun depth-limited search


View Full Document

Stanford CS 157 - Lecture 14 Epilog

Documents in this Course
Lecture 1

Lecture 1

15 pages

Equality

Equality

32 pages

Lecture 19

Lecture 19

100 pages

Epilog

Epilog

29 pages

Equality

Equality

34 pages

Load more
Download Lecture 14 Epilog
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 14 Epilog and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 14 Epilog 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?