Artificial Intelligence 2, Slides of Artificial Intelligence

Prior to 2002 this course was essentially what is now AI 1, and ... Consequently, many of the exam questions prior to 2002 are not relevant, although.

Typology: Slides

2021/2022

Uploaded on 08/01/2022

fabh_99
fabh_99 🇧🇭

4.4

(53)

543 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Artificial Intelligence 2
Past exam questions
Dr Sean B Holden, January 2012
1 A short historical note...
There is usually some degree of confusion as to precisely which past exam questions are relevant to
this course. Allow me to explain. Prior to 2002 this course was essentially what is now AI 1, and
at the time AI 1 was a Prolog programming course. The syllabuses changed when I took over the
courses in 2002. Consequently, many of the exam questions prior to 2002 are not relevant, although
some are. The past exam questions mentioned in what follows are the ones that remain relevant to AI
2. Some of the older ones may mention subjects not at present in the syllabus. Those items can safely
be ignored. Finally, the L
A
TEX files for some of the earlier questions are no longer available so they
are not included here. However,copies of the questions can be found in the usual place:
www.cl.cam.ac.uk/teaching/exams/pastpapers/
2 Planning
2011, Paper 7, question 2:
Consider the following propositional planning problem.
Start state: ¬A,¬B,¬C,D.
Goal: A,B,C,¬D.
Actions:
Action 1 has preconditions A,B,Cand effect ¬D.
Action 2 has preconditions ¬A,¬Band effects Aand B.
Action 3 has preconditions ¬B,¬Cand effects Band C.
Action 4 has precondition Band effect ¬B.
1. Using an entire sheet of paper, draw the planning graph as far as state level S3, where the start
state is at state level S0and the first action level is A0. Do not add any mutex links at this point.
[5 marks]
2. Describe each of the five kinds of mutex link that can be incorporated in a planning graph. Add
one example of each to the graph you produced in part 1. Clearly label the links to make clear
which type they are. [10 marks]
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Artificial Intelligence 2 and more Slides Artificial Intelligence in PDF only on Docsity!

Artificial Intelligence 2

Past exam questions

Dr Sean B Holden, January 2012

1 A short historical note...

There is usually some degree of confusion as to precisely which past exam questions are relevant to this course. Allow me to explain. Prior to 2002 this course was essentially what is now AI 1, and at the time AI 1 was a Prolog programming course. The syllabuses changed when I took over the courses in 2002. Consequently, many of the exam questions prior to 2002 are not relevant, although some are. The past exam questions mentioned in what follows are the ones that remain relevant to AI

  1. Some of the older ones may mention subjects not at present in the syllabus. Those items can safely be ignored. Finally, the LATEX files for some of the earlier questions are no longer available so they are not included here. However, copies of the questions can be found in the usual place:

www.cl.cam.ac.uk/teaching/exams/pastpapers/

2 Planning

2011, Paper 7, question 2:

Consider the following propositional planning problem.

Start state: ¬A, ¬B, ¬C, D.

Goal: A, B, C, ¬D.

Actions:

  • Action 1 has preconditions A,B,C and effect ¬D.
  • Action 2 has preconditions ¬A, ¬B and effects A and B.
  • Action 3 has preconditions ¬B, ¬C and effects B and C.
  • Action 4 has precondition B and effect ¬B.
  1. Using an entire sheet of paper, draw the planning graph as far as state level S 3 , where the start state is at state level S 0 and the first action level is A 0. Do not add any mutex links at this point. [5 marks]
  2. Describe each of the five kinds of mutex link that can be incorporated in a planning graph. Add one example of each to the graph you produced in part 1. Clearly label the links to make clear which type they are. [10 marks]
  1. At which level in the planning graph will all goals first be present simultaneously? Will the GraphPlan algorithm be able to extract a working plan without extending it beyond this level? Explain your answer, adding further mutex links to your diagram if necessary. [5 marks]

2009, Paper 7, question 4:

Evil Robot has almost completed his Evil Plan for the total destruction of the human race. He has two nasty chemicals, which he has imaginatively called A and B and which are currently stored in containers 1 and 2 respectively. All he has to do now is mix them together in container 3. His designer, an equally evil computer scientist, has equipped Evil Robot with a propositional planning system that allows him to reason about the locations of particular things and about moving a thing from one place to another.

  1. Explain how this problem might be represented within a propositional planning system. Give specific examples of the way in which the start state and goal can be represented. [5 marks]
  2. Describe in detail an algorithm that can be used to find a plan using this form of representation. [5 marks]
  3. Give a specific example of a successor-state axiom using the representation you suggested in part (1). [2 marks]
  4. Explain why in this particular planning problem it might be necessary to include one or more precondition axioms and give an example of such an axiom using your representation. [2 marks]
  5. Explain why in this particular planning problem it might be necessary to include one or more ac- tion exclusion axioms and give an example of such an axiom using your representation. Suggest why it might be unwise to include too many axioms of this type, and explain how a reasonable collection of such axioms might be chosen in a systematic way. [4 marks]
  6. Explain how in this problem it might be possible to include state constraints as an alternative to action exclusion axioms, and give a specific example of such a constraint using your represen- tation. [2 marks]

2008, Paper 7, question 6:

We have a simple, propositionalised planning problem and we suspect that we might be able to solve it using the GraphPlan algorithm. The problem is as follows.

Action A has preconditions {¬X} and effects {X, Z}, action B has preconditions {¬Y } and effects {X, Y }, and action C has preconditions {X, Y, Z} and effects {W }. The start state for the problem is {¬W, ¬X, ¬Y, ¬Z} and the goal is {W }.

A Pr(b|A) B Pr(c|B) B C Pr(d|B, C) ⊤ 0. 1 ⊤ 0. 2 ⊤ ⊤ 0. 6 ⊥ 0. 15 ⊥ 0. 95 ⊤ ⊥ 0. 5 ⊥ ⊤ 0. 4 ⊥ ⊥ 0. 3

  1. Write down an expression for the full joint distribution of the random variables A, B, C and D. Compute the probability that A and B are ⊤ while C and D are ⊥. [2 marks]
  2. Use the variable elimination algorithm to compute the probability distribution of B conditional on the evidence that D = ⊥. [16 marks]
  3. Explain why the variable elimination might not be an effective algorithm to use in practice and suggest an alternative that addresses the shortcoming you have given. [2 marks]

2006, paper 8, question 9:

Consider the following Bayesian network:

The associated probability distributions for the binary random variables A, B, C and D are Pr(a) =

  1. 1 , Pr(¬a) = 0. 9 , Pr(b) = 0. 8 , Pr(¬b) = 0. 2 , and:

A B Pr(c|A, B) B C Pr(d|B, C) ⊤ ⊤ 0.5 ⊤ ⊤ 0. ⊤ ⊥ 0.6 ⊤ ⊥ 0. ⊥ ⊤ 0.8 ⊥ ⊤ 0. ⊥ ⊥ 0.7 ⊥ ⊥ 0.

  1. Explain why the representation of the joint distribution of A, B, C and D using the Bayesian network is preferable to a direct tabular representation. [2 marks]
  2. Use the variable elimination algorithm to compute the probability distribution of B conditional on the evidence that D = ⊤. [16 marks]
  3. Comment on the computational complexity of the variable elimination algorithm. [2 marks]

2005, paper 8, question 2:

  1. A given probabilistic inference problem involves a query random variable (RV) Q, evidence RVs E = (E 1 ,... , En) and unobserved RVs U = (U 1 ,... , Um). Assuming that RVs are discrete, state the equation allowing the inference Pr(Q|E = (e 1 ,... , en)) to be computed using the full joint distribution of the RVs and explain why in practice such a method might fail. [5 marks]
  2. Give a general definition of a Bayesian network (BN), and explain how a BN represents a joint probability distribution. [4 marks]
  3. Define conditional independence and explain how BNs make use of this concept to reduce the effect of the difficulties mentioned in your answer to ( a ). Describe the way in which conditional independence is employed by the naive Bayes algorithm. [6 marks]
  4. Describe two further issues relevant to the application of BNs in a practical context and describe briefly how these issues can be addressed. [5 marks]

4 Value of Perfect Information

2011, paper 8, question 8:

  1. Give a definition of expected utility and explain why the concept is useful in the context of decision-making. [2 marks]
  2. Give a definition of the value of perfect information and explain why the concept is useful in the context of decision-making. [4 marks]
  3. A talented, but nervous, student has to sit a difficult and important examination. There are only two possible outcomes: pass or fail and the student attaches to these utilities of U (pass) = 106 and U (fail) = 10^8. Lacking in confidence, his beliefs are that Pr(pass|revise) = 0. 55 and Pr(pass|¬revise) = 0. 2. Calculate the expected utility of the situation described. [ marks]
  4. The student finds what he believes might be a copy of this years examination paper, discarded by a careless examiner. He believes that

Pr(pass|revise, thisYearsPaper) = 0. 75

However, should he be wrong then

Pr(pass|revise, ¬thisYearsPaper) = 0. 1

as he will waste time learning to answer the wrong questions, because he will revise from the wrong paper. Not revising implies

Pr(pass|¬revise, thisYearsPaper) = 0. 7

However, should he be wrong then

Pr(pass|¬revise, ¬thisYearsPaper) = 0. 08

  1. Explain how in general the maximum a posteriori (MAP) classifier works. [3 marks]
  2. Compute the class that the MAP classifier would predict in this case. [10 marks]
  3. The preferred alternative to the MAP classifier is the Bayesian classifier, computing Pr(x ∈ C 1 |x, s). where s is the vector of examples. Show that

Pr(x ∈ C 1 |x, s) =

hi

Pr(x ∈ C 1 |hi, x) Pr(hi|s)

What are you assuming about independence in deriving this result? [3 marks]

  1. Compute the class that the Bayesian classifier would predict in this case. [4 marks]

6 Hidden Markov Models

2008, paper 9, question 5:

A friend of mine likes to climb on the roofs of Cambridge. To make a good start to the coming week, he climbs on a Sunday with probability 0.98. Being concerned for his own safety, he is less likely to climb today if he climbed yesterday, so

Pr(climb today|climb yesterday) = 0. 4

If he did not climb yesterday then he is very likely to climb today, so

Pr(climb today|¬climb yesterday) = 0. 1

Unfortunately, he is not a very good climber, and is quite likely to injure himself if he goes climbing, so Pr(injury|climb today) = 0. 8

whereas Pr(injury|¬climb today) = 0. 1

  1. Explain how my friend’s behaviour can be formulated as a Hidden Markov Model. What as- sumptions are required? [4 marks]
  2. You learn that on Monday and Tuesday evening he obtains an injury, but on Wednesday evening he does not. Use the filtering algorithm to compute the probability that he climbed on Wednes- day. [8 marks]
  3. Over the course of the week, you also learn that he does not obtain an injury on Thursday or Friday. Use the smoothing algorithm to compute the probability that he climbed on Thursday. [8 marks]

2010, Paper 7, question 4:

Professor Elbow-Patch is not the man he used to be, and in particular has a tendency to fall over for no apparent reason. This problem is made worse if he has drunk port with his dinner. He almost always drinks port on a Sunday, and if he drinks on any given day he is unlikely—for the sake of his long-suffering liver—to drink port on the following day. However, if he does not drink on a given day then he is very likely to succumb to temptation on the following day.

The probability that he falls over after drinking is Pr(fall|drank) = 0. 7. The probability that he falls over when he hasn’t drunk is Pr(fall|¬drank)) = 0. 1. He drinks on a Sunday with probability

    1. If he has not drunk on a given day then the probability that he drinks the following day is Pr(drink today|¬drank yesterday) = 0. 8. If he has drunk on a given day then the probability that he drinks the following day is Pr(drink today|drank yesterday) = 0. 1.
  1. Explain how this problem can be represented as a hidden Markov model. What assumptions are required? [4 marks]

  2. Denoting observations at time i by Ei and states at time i by Si give a derivation of the filtering algorithm for computing Pr(St|E 1 ,... , Et). [8 marks]

  3. You observe the Professor on Sunday, Monday and Tuesday and notice that he doesn’t fall over at all. Use the filtering algorithm to compute the probability that he drank port on Tuesday. [ marks]

2005, paper 9, question 8:

We wish to model the unobservable state of an environment using a sequence S 0 → S 1 → S 2 → · · · of sets of random variables (RVs) where at time i we are in state Si and observe a set of RVs Ei. The distributions of the RVs do not change over time, and observations depend only on the current state.

  1. Define a Markov process , the transition model and the sensor model within this context. [ marks]
  2. Assuming that evidence E1:t = e1:t = (e 1 , e 2 ,... , et) has been observed define the tasks of filtering , prediction and smoothing. [3 marks]
  3. Derive a recursive estimation algorithm for performing filtering by combining the evidence et obtained at time t with the result of filtering at time t − 1. [8 marks]
  4. How does a hidden Markov model differ from the setup described? [1 mark]
  5. Show how for the case of a hidden Markov model your filtering algorithm can be expressed in terms only of matrix operations. [5 marks]

7 Reinforcement Learning

2007, paper 9, question 9: