Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 416 Artificial Intelligence Lecture 13 First-Order Logic Chapter 9 Lecture 13 First-Order Logic Chapter 9.

Similar presentations


Presentation on theme: "CS 416 Artificial Intelligence Lecture 13 First-Order Logic Chapter 9 Lecture 13 First-Order Logic Chapter 9."— Presentation transcript:

1 CS 416 Artificial Intelligence Lecture 13 First-Order Logic Chapter 9 Lecture 13 First-Order Logic Chapter 9

2 Homework Assignment First-order logic assignment due on Wednesday No use of late days on this oneNo use of late days on this one Answers will be provided afterwardsAnswers will be provided afterwards First-order logic assignment due on Wednesday No use of late days on this oneNo use of late days on this one Answers will be provided afterwardsAnswers will be provided afterwards

3 Midterm October 25 th Up through chapter 9 (excluding chapter 5) Old midterm on web site (with answers)Old midterm on web site (with answers) Study guide on web siteStudy guide on web site October 25 th Up through chapter 9 (excluding chapter 5) Old midterm on web site (with answers)Old midterm on web site (with answers) Study guide on web siteStudy guide on web site

4 AI and Finance Gerald Tesauro – Best Backgammon program GERALD TESAURO is a research staff member at IBM. Current research interests include reinforcement learning in the nervous system, and applications of neural networks to financial time-series analysis and to computer virus recognitionGERALD TESAURO is a research staff member at IBM. Current research interests include reinforcement learning in the nervous system, and applications of neural networks to financial time-series analysis and to computer virus recognitionhttp://www.research.ibm.com/infoecon/paper10.html Gerald Tesauro – Best Backgammon program GERALD TESAURO is a research staff member at IBM. Current research interests include reinforcement learning in the nervous system, and applications of neural networks to financial time-series analysis and to computer virus recognitionGERALD TESAURO is a research staff member at IBM. Current research interests include reinforcement learning in the nervous system, and applications of neural networks to financial time-series analysis and to computer virus recognitionhttp://www.research.ibm.com/infoecon/paper10.html

5 Inference in first-order logic Our goal is to prove that KB entails a fact,  We use logical inferenceWe use logical inference  Forward chaining  Backward chaining  Resolution All three logical inference systems rely on search to find a sequence of actions that derive the empty clause Our goal is to prove that KB entails a fact,  We use logical inferenceWe use logical inference  Forward chaining  Backward chaining  Resolution All three logical inference systems rely on search to find a sequence of actions that derive the empty clause

6 Search and forward chaining Start with KB full of first-order definite clauses Disjunction of literals with exactly one positiveDisjunction of literals with exactly one positive –Equivalent to implication with conjunction of positive literals on left (antecedent / body / premise) and one positive literal on right (consequent / head / conclusion) –Propositional logic used Horn clauses, which permit zero or one to be positive Look for rules with premises that are satisfied (use substitution to make matches) and add conclusions to KBLook for rules with premises that are satisfied (use substitution to make matches) and add conclusions to KB Start with KB full of first-order definite clauses Disjunction of literals with exactly one positiveDisjunction of literals with exactly one positive –Equivalent to implication with conjunction of positive literals on left (antecedent / body / premise) and one positive literal on right (consequent / head / conclusion) –Propositional logic used Horn clauses, which permit zero or one to be positive Look for rules with premises that are satisfied (use substitution to make matches) and add conclusions to KBLook for rules with premises that are satisfied (use substitution to make matches) and add conclusions to KB

7 Search and forward chaining Which rules have premises that are satisfied (modus ponens)?Which rules have premises that are satisfied (modus ponens)? –A ^ E => C… nope –B ^ D => E… yes –E ^ C ^ G ^ H => I… nope  A ^ E = C… yes  E ^ C ^ G ^ H => I… yes Which rules have premises that are satisfied (modus ponens)?Which rules have premises that are satisfied (modus ponens)? –A ^ E => C… nope –B ^ D => E… yes –E ^ C ^ G ^ H => I… nope  A ^ E = C… yes  E ^ C ^ G ^ H => I… yes Breadth First A, B, D, G, HA, B, D, G, H A ^ E => CA ^ E => C B ^ D => EB ^ D => E E ^ C ^ G ^ H => IE ^ C ^ G ^ H => I Breadth First A, B, D, G, HA, B, D, G, H A ^ E => CA ^ E => C B ^ D => EB ^ D => E E ^ C ^ G ^ H => IE ^ C ^ G ^ H => I

8 Search and forward chaining Would other search methods work? Yes, this technique falls in standard domain of all searchesYes, this technique falls in standard domain of all searches Would other search methods work? Yes, this technique falls in standard domain of all searchesYes, this technique falls in standard domain of all searches

9 Search and backward chaining Start with KB full of implications Find all implications with conclusion matching the queryFind all implications with conclusion matching the query Add to fringe list the unknown premisesAdd to fringe list the unknown premises –Adding could be to front or rear of fringe (depth or breadth) Start with KB full of implications Find all implications with conclusion matching the queryFind all implications with conclusion matching the query Add to fringe list the unknown premisesAdd to fringe list the unknown premises –Adding could be to front or rear of fringe (depth or breadth)

10 Search and backward chaining Are all the premises of I satisfied? NoAre all the premises of I satisfied? No –For each (C E G H) are each of their premises satisfied?  C? no, put its premises on fringe –For each (A and E) are their premises satisfied? A… yes E… no, add premises for each B and D B… yes D… yes E…yes C… yes Are all the premises of I satisfied? NoAre all the premises of I satisfied? No –For each (C E G H) are each of their premises satisfied?  C? no, put its premises on fringe –For each (A and E) are their premises satisfied? A… yes E… no, add premises for each B and D B… yes D… yes E…yes C… yes Depth First A, B, D, G, HA, B, D, G, H A ^ E => CA ^ E => C B ^ D => EB ^ D => E C ^ E ^ G ^ H => IC ^ E ^ G ^ H => I Depth First A, B, D, G, HA, B, D, G, H A ^ E => CA ^ E => C B ^ D => EB ^ D => E C ^ E ^ G ^ H => IC ^ E ^ G ^ H => I

11 Search and backward chaining Are all the premises of I satisfied? NoAre all the premises of I satisfied? No –For each (C E G H) are each of their premises satisfied?  C… yes –E… yes –G, H… yes –I… yes Are all the premises of I satisfied? NoAre all the premises of I satisfied? No –For each (C E G H) are each of their premises satisfied?  C… yes –E… yes –G, H… yes –I… yes Breadth First A, B, D, G, HA, B, D, G, H A ^ E => CA ^ E => C B ^ D => EB ^ D => E C ^ E ^ G ^ H => IC ^ E ^ G ^ H => I Breadth First A, B, D, G, HA, B, D, G, H A ^ E => CA ^ E => C B ^ D => EB ^ D => E C ^ E ^ G ^ H => IC ^ E ^ G ^ H => I

12 Backward/forward chaining Don’t explicitly tie search method to chaining direction

13 Inference with resolution We put each first-order sentence into conjunctive normal formWe put each first-order sentence into conjunctive normal form –We remove quantifiers –We make each sentence a disjunction of literals (each literal is universally quantified) We show KB ^ ~  is unsatisfiable by deriving the empty clauseWe show KB ^ ~  is unsatisfiable by deriving the empty clause –Resolution inference rule is our method  Keep resolving until the empty clause is reached We put each first-order sentence into conjunctive normal formWe put each first-order sentence into conjunctive normal form –We remove quantifiers –We make each sentence a disjunction of literals (each literal is universally quantified) We show KB ^ ~  is unsatisfiable by deriving the empty clauseWe show KB ^ ~  is unsatisfiable by deriving the empty clause –Resolution inference rule is our method  Keep resolving until the empty clause is reached

14 Example

15 Resolution example

16 Theorem provers Logical inference is a powerful way to “reason” automatically Prover should be independent of KB syntaxProver should be independent of KB syntax Prover should use control strategy that is fastProver should use control strategy that is fast Prover can support a human byProver can support a human by –Checking a proof by filling in voids –Person can kill off search even if semi-decidable Logical inference is a powerful way to “reason” automatically Prover should be independent of KB syntaxProver should be independent of KB syntax Prover should use control strategy that is fastProver should use control strategy that is fast Prover can support a human byProver can support a human by –Checking a proof by filling in voids –Person can kill off search even if semi-decidable

17 Practical theorem provers Boyer-Moore (1979)Boyer-Moore (1979) –First rigorous proof of Godel Incompleteness Theorem OTTER (1997)OTTER (1997) –Solved several open questions in combinatorial logic EQPEQP –Solved Robbins algebra, a proof of axioms required for Boolean algebra  Problem posed in 1933 and solved in 1997 after eight days of computation Boyer-Moore (1979)Boyer-Moore (1979) –First rigorous proof of Godel Incompleteness Theorem OTTER (1997)OTTER (1997) –Solved several open questions in combinatorial logic EQPEQP –Solved Robbins algebra, a proof of axioms required for Boolean algebra  Problem posed in 1933 and solved in 1997 after eight days of computation

18 Practical theorem provers Verification and synthesis of hard/soft ware Software (axiomize all syntactic elements of programming language)Software (axiomize all syntactic elements of programming language) –Verify a program’s output is correct for all inputs –There exists a program, P, that satisfies a specification  Synthesize P during search Hardware (axiomize all interactions between signal and circuit elements)Hardware (axiomize all interactions between signal and circuit elements) –Verify that interactions between signals and circuits is robust  Will CPU work in all conditions? –There exists a circuit, C, that satisfies a specification  Synthesize C during search Verification and synthesis of hard/soft ware Software (axiomize all syntactic elements of programming language)Software (axiomize all syntactic elements of programming language) –Verify a program’s output is correct for all inputs –There exists a program, P, that satisfies a specification  Synthesize P during search Hardware (axiomize all interactions between signal and circuit elements)Hardware (axiomize all interactions between signal and circuit elements) –Verify that interactions between signals and circuits is robust  Will CPU work in all conditions? –There exists a circuit, C, that satisfies a specification  Synthesize C during search


Download ppt "CS 416 Artificial Intelligence Lecture 13 First-Order Logic Chapter 9 Lecture 13 First-Order Logic Chapter 9."

Similar presentations


Ads by Google