Download presentation
Presentation is loading. Please wait.
1
Introduction to AI & AI Principles (Semester 1) WEEK 9 - Wednesday Introduction to AI & AI Principles (Semester 1) WEEK 9 - Wednesday (2008/09) John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK
2
Deductive Reasoning in Logic (contd.)
3
Reminder: Towards A Rule involving Variable Instantiation u We’d like to be able to go from, say, ( p) (is-shop(p) likes(Sally, p)) and, say, is-shop(Gap) to likes(Sally, Gap). uCan do this by first “instantiating” the variable p to get is-shop(Gap) likes(Sally, Gap) and then using MP (Modus Ponens).
4
(Universal) Variable Instantiation uOther terminology: variable substitution; universal elimination. uNOTE: a term is a constant symbol (e.g., Sally), variable, or the application of a function symbol (e.g., father-of) to terms. l E.g.: favourite-shop-of(father-of(Sally). A ground term is one that doesn’t involve any variables. uA simplified rule is: IF-HAVE ( α)A THEN-HAVE A[α /t] where α is a variable, A is a formula, t is a term, t is ground, and A[a/t] is A with all the (not-further-quantified) occurrences of α replaced by t. [We say t is substituted for the “free” occurrences of α in A.] uSo with A being is-shop(p) likes(Sally, p), α being p, and t being Gap, we get A[α /t] to be is-shop(Gap) likes(Sally, Gap).
5
A More Complex Example uWe can reason from, say, ( q,p) ( (is-shop(q) modern(q) is-person(p)) likes(p, q) ) and, say, the separate propositions is-shop(Gap), is-modern(Gap), is-person(Sally) to likes(Sally, Gap) uby doing [universal] instantiation (= universal elimination) action(s) to get (is-shop(Gap) modern(Gap) is-person(Sally)) likes(Sally, Gap)), and doing some conjunction-introduction and an MP action.
6
Dependency Diagram (Proof Tree) (is-shop(G) mod(G) is-pers(S)) likes(S, G) UnivElim (q:G) likes(S, G) is-shop(G) mod(G) is-pers(S) is-shop(G) mod(G) is-pers(S) ( q,p) ( (is-shop(q) mod(q) is-pers(p)) likes(p, q)) ( p) ( (is-shop(G) mod(G) is-pers(p)) likes(p, G)) UnivElim (p:S) Modus Ponens Conj Intro
7
Variant of Previous Example uWe can reason from, say, ( q) ( is-modern-shop(q) likes(Sally, q) ), likes(Sally, Gap), to is-modern-shop(Gap), by a universal elimination (instantiation) and a use of MT (Modus Tollens – see a previous slide). uNB: an implication can support the drawing of conclusions in both directions across it (though in different ways), unlike a rule in a PS such as IF-HAVE is-modern-shop(q) THEN-HAVE likes(Sally, q))
8
Proof Tree is-mod-shop(G) likes(S, G) is- is-mod-shop(S, G) ( q) ( (is-mod-shop(q) likes(S, q) ) UnivElim (q:S) Modus Tollens likes(S, G)
9
Another Example uWe can reason from, say, ( p) (is-person(p) asleep(p) (unconscious(p)) dead(p))) (should-call(Ego, Police) should-protect(Ego,p))), ( q,g) (is-person(q) is-game(g) playing(q,g) asleep(q)), is-person(Person123), playing(Person123, Chess), unconscious(Person123), is-game(Chess) to should-protect(Ego, Person123).
10
Part of Proof Tree UnivElim (p:P123) ( p) ((is-pers(p) asleep(p) (unconsc(p)) dead(p))) (shld-call(Ego, Pol) should-prot(Ego,p))) Modus Ponens Conj Intro shld-call(Ego, Pol) shld-prot(Ego, P123) (is-pers(P123) asleep(P123) (unconsc(P123)) dead(P123))) (shld-call(Ego, Pol) should-prot(Ego,P123)) is-pers(P123) asleep(P123) (unconsc(P123)) dead(P123)) is-pers(P123) unconsc(P123)) dead(P123) asleep(P123) unconsc(P123)) Disj Intro shld-prot(Ego, P123) Conj Elim
11
Some Difficulties uWhat inference rule to apply when, and exactly how (e.g., what variable instantiations to do)?? ui.e., hefty search process: how to guide it? NB: Searching backwards from a reasoning goal is generally beneficial. (Backwards chaining.) uLots of fiddling around, piecing together and taking apart conjunctions, disjunctions, etc. uAnd have only shown some of the types of fiddling that are needed! uIt would be more convenient to be able combine the effects of certain inference rules in various ways, e.g. to combine MP and variable instantiation.
12
Some Other Sorts of Fiddling uFollowing are logical inference rules in non-traditional IF-THEN form. uRules about distributivity of conjunction and disjunction over each other. l IF-HAVE A (B C) THEN-HAVE (A B) (A C) and its converse IF-HAVE (A B) (A C) THEN-HAVE A (B C) l IF-HAVE A (B C) THEN-HAVE (A B) (A C) and its converse IF-HAVE (A B) (A C) THEN-HAVE A (B C)
13
Some Other Sorts of Fiddling, contd. uDouble negation: IF-HAVE A THEN-HAVE A IF-HAVE A THEN-HAVE A uDe Morgan’s Laws (in inference-rule form): l IF-HAVE (A B) THEN-HAVE A B and its converse IF-HAVE A B THEN-HAVE (A B) l IF-HAVE (A B) THEN-HAVE A B and its converse IF-HAVE A B THEN-HAVE (A B)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.