Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to AI & AI Principles (Semester 1) WEEK 6 – Wednesday Introduction to AI & AI Principles (Semester 1) WEEK 6 – Wednesday (2008/09) John Barnden.

Similar presentations


Presentation on theme: "Introduction to AI & AI Principles (Semester 1) WEEK 6 – Wednesday Introduction to AI & AI Principles (Semester 1) WEEK 6 – Wednesday (2008/09) John Barnden."— Presentation transcript:

1 Introduction to AI & AI Principles (Semester 1) WEEK 6 – Wednesday Introduction to AI & AI Principles (Semester 1) WEEK 6 – Wednesday (2008/09) John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK

2 Exercise1 [5 mins] on PSs: Forwards Chaining holds1(M, Ego, the-right..(M)) holds0(Ego, B) next-to(M, F) next-to(M, Peter) 1)IF next-to(a, o)  holds0(a, x) THEN next-to(x, o). 2)IF in(a, room1)  holds0(a, x) THEN in(x, room1) 3)IF holds1(a, z, h) THEN holds0(a, z). 4)IF holds3(a, z) THEN holds0(a, z). 5)IF in(a, room1)  distinct(room1, room2) THEN  in(a, room2) 6)IF has(a, o)  distinct(a, b) THEN  has(b, o). Working Memory: Initial State (M = Mike) next-to(B, F) Final WM should include: Fill in the intermediate Working Memory states and provide a dependency diagram.

3 Reminder: Eg. of Forwards Chaining holds3(Ego, B)  distinct(K,S) in(Ego, K) 1)IF next-to(a, o)  holds0(a, x) THEN next-to(x, o). 2)IF in(a, room1)  holds0(a, x) THEN in(x, room1) 3)IF holds1(a, z, h) THEN holds0(a, z). 4)IF holds3(a, z) THEN holds0(a, z). 5)IF in(a, room1)  distinct(room1, room2) THEN  in(a, room2) 6)IF has(a, o)  distinct(a, b) THEN  has(b, o). Working Memory: Initial State Apply an instance of Rule 4 holds3(Ego, B) holds0(Ego, B)  distinct(K,S) in(Ego, K)  Apply an instance of Rule 2 holds3(Ego, B) holds0(Ego, B) distinct(K,S)  in(Ego, K) in(B, K)  holds3(Ego, B) holds0(Ego, B) distinct(K,S) in(Ego, K) in(B, K)  in(B, S) Apply an instance of Rule 5

4 Reminder: Dependency Diagram  in(B, S) in(B, K)distinct(K,S) in(Ego, K) holds0(Ego, B) holds3(Ego, B) Rule 4 (a:Ego, z:B) Rule 2 (a:Ego, room1:K, x: B) Rule 5 (a:Ego, room1:K, room2: S) room1:K, room2: S)

5 Other Exercises [15 mins] on PSs  2)If WM contains  holds0(Mike, B), can the PS infer  holds3(Mike, B)? If so, justify your answer, and, if not, create a rule that would allow the inference. 3)Provide a rule that would allow the PS to infer that an agent is holding something (somehow) if he/she/it has it. 4)Modify the rule to apply only to agents that are people. You will need to introduce a new predicate symbol. Show by means of a forward-chaining dependency diagram how it could apply to Mike. 5)What should happen if two different rule instances infer the same conclusion? Suggest a suitable piece of dependency diagram. 6)Suppose we introduce a predicate symbol distinct3 that can be used as in the following example: distinct3(M, B, Ego). This means that all three things are different. What rules would it be useful to have linking distinct3 to our existing predicate symbol distinct (which applies only to two things ata time)? 7)Suppose the WM contains next-to(M,Ego). How would/could the PS infer next- to(Ego,M) ?

6 Answers to Other Exercises on PSs 2)Q:  2)Q: If WM contains  holds0(Mike, B), can the PS infer  holds3(Mike, B)? If so, justify your answer, and, if not, create a rule that would allow the inference. A:  A: NO. A rule can only conclude (an instantiation of) its THEN part. We would need the following rule: IF  holds0(a, z) THEN  holds3(a, z). (Terminology: the negated converse of something is called the contrapositive of it.) 3)Q: 3)Q: Provide a rule that would allow the PS to infer that an agent is holding something (somehow) if he/she/it has it. A: A: IF holds0(a, z) THEN has(a, z). 4)Q: 4)Q: Modify the rule to apply only to agents that are people. You will need to introduce a new predicate symbol. A: A: IF is-person(a)  holds0(a, z) THEN has(a, z). Q contd: Q contd: Show by means of a forward-chaining dependency diagram how it could apply to Mike. A: A: See next slide.

7 Ans. Contd.To Other Exercise 4: Dependency Diagram has(M, B) is-person(M)holds0(M,B) The Rule (a:M, z: B)

8 Answers to Other Exercises, contd. 5)Q: 5)Q: What should happen if two different rule instances infer the same conclusion? Suggest a suitable piece of dependency diagram. A: A: Well, you just have two separate pieces of evidence supporting the conclusion instead of one. (You don’t do anything such as creating a new copy of the conclusion.) In a diagram, you need to package the arrows appropriately, as below. Note that different rules applications can have arrows coming from the same place (is-person(M) in the example): has(M, B) is-person(M) holds0(M,B) One Rule (….) blah… blurb… Another Rule (….)

9 Answers to Other Exercises, contd. 6)Q: 6)Q: Suppose we introduce a predicate symbol distinct3 that can be used as in the following example: distinct3(M, B, Ego). This means that all three things are different. What rules would it be useful to have linking distinct3 to our existing predicate symbol distinct (which applies only to two things at a time)? A: A: You would (at least) need three rules like IF distinct3(x, y, z) THEN distinct(x, y). Or you could have one rule that infers a conjunction of distinct applications (I haven’t shown this before in examples): IF distinct3(x, y, z) THEN distinct(x, y)  distinct(y,z)  distinct(x,z). You would also need the converse of that: IF distinct(x, y)  distinct(y,z)  distinct(x,z) THEN distinct3(x, y, z). To infer negations of distinctness, you would need a suite of rules for that. By the way, irrespective of whether we use the predicate distinct3, you need a rule to handle the symmetry of (at least) binary distinctness: IF distinct(x, y) THEN distinct(y, x).

10 Answers to Other Exercises, contd. 7)Q: 7)Q: Suppose the WM contains next-to(M,Ego). How would/could the PS infer next-to(Ego,M) ? A: A: Unless there’s a more indirect way via other rules, you need a rule that explicitly states the symmetry, much like the rule for the symmetry of distinctness in my answer to Ex. 6.

11 Natural Language Issues in Planning the Delivery of One Drink

12 u“Two spoonfuls of sugar please” l VAGUENESS inherent in concepts used u“A bit of / a lot of / not too much / … milk in it please” l VAGUENESS of (mass) quantification u“Rob, several people want decaff coffee” l VAGUENESS of (discrete) quantification u“Everyone laughed when I came in!” “Did someone spill their coffee on the floor?” l CONTEXT-SENSITIVITY of universal and existential quantification (respectively)


Download ppt "Introduction to AI & AI Principles (Semester 1) WEEK 6 – Wednesday Introduction to AI & AI Principles (Semester 1) WEEK 6 – Wednesday (2008/09) John Barnden."

Similar presentations


Ads by Google