Sample Exam Questions for Intro to AI - Computing at ... Exam topics DT228-3.pdf · development...

7
Page 1 of 7 Sample Exam Questions for Intro to AI Q (a) Describe the architecture of a rule-based expert system. (b) Explain why the use of an expert system shell can dramatically reduce the development time of an expert system. (c) With the aid of a simple example, outline the Prolog inference mechanism, making reference to unification and backtracking. Q (a) Describe the architecture of a rule-based expert system. (b) What is meant by the terms data driven and goal driven? Mention an AI language that uses one of these approaches along with an illustrative example. (c) In data driven rule based systems, when many rules can be fired at the same times, outline three strategies that an inference engine might use in choosing which rule to fire. (d) Explain why the use of an expert system shell can dramatically reduce the development time of an expert system. Q (a) Outline three sources of uncertain knowledge. Express the first 4 of the rules in part (c) in Prolog. Give three reasons why Bayesian reasoning is difficult to use in an expert system. Also, briefly describe three advantages in using certainty factors as opposed to Bayesian reasoning. Briefly mention two well-known historical expert systems, one of which used Bayesian reasoning and the other certainty factors.

Transcript of Sample Exam Questions for Intro to AI - Computing at ... Exam topics DT228-3.pdf · development...

Page 1 of 7

Sample Exam Questions for Intro to AI

Q (a) Describe the architecture of a rule-based expert system.

(b) Explain why the use of an expert system shell can dramatically reduce the

development time of an expert system.

(c) With the aid of a simple example, outline the Prolog inference mechanism, making

reference to unification and backtracking.

Q (a) Describe the architecture of a rule-based expert system.

(b) What is meant by the terms data driven and goal driven? Mention an AI language that

uses one of these approaches along with an illustrative example.

(c) In data driven rule based systems, when many rules can be fired at the same times,

outline three strategies that an inference engine might use in choosing which rule to

fire.

(d) Explain why the use of an expert system shell can dramatically reduce the

development time of an expert system.

Q (a) Outline three sources of uncertain knowledge.

Express the first 4 of the rules in part (c) in Prolog.

Give three reasons why Bayesian reasoning is difficult to use in an expert system.

Also, briefly describe three advantages in using certainty factors as opposed to

Bayesian reasoning. Briefly mention two well-known historical expert systems, one of

which used Bayesian reasoning and the other certainty factors.

Page 2 of 7

(c) Given the forecasting rules below, show how they would fire to forecast tomorrow’s

weather when provided with the following information: there is rain today and the

rainfall is low with a certainty factor of 0.8, and also it is cold with a certainty factor

of 0.9. This formula may be useful:

cf(cf1, cf2) = cf1 + cf2 × (1 – cf1) Rule: 1

if today is rain then tomorrow is rain {cf 0.5}

Rule: 2

if today is dry then tomorrow is dry {cf 0.5}

Rule: 3 if today is rain and rainfall is low then tomorrow is dry {cf 0.6}

Rule: 4

if today is rain and rainfall is low and temperature is cold then tomorrow is dry {cf 0.7}

Rule: 5

if today is dry and temperature is warm then tomorrow is rain {cf 0.65}

Rule: 6

if today is dry and temperature is warm and sky is overcast then tomorrow is rain {cf 0.55}

Q (a) Using a Prolog functor as the appropriate data structure for recording information on a

car such as value, registration number, year of purchase, mileage and make; declare

three example cars.

(b) Write a rule to display value and mileage information on all ford cars in the database

using the type of data in part(a).

(c) Given facts like: parent(tom, mary).

parent(tom, jim).

parent(jim, sue).

Write a predicate which could infer that tom is an ancestor of sue.

Page 3 of 7

(d) What happens when the following query is presented to a Prolog interpreter?

a(X,b(2,abc),[1,2,3,4]) = a(person(tom,24),b(_,Y),[_,Z|T]).

What happens if = is replaced with == ?

(e) Given the Fibonacci sequence: 0,1,1,2,3,5,8,13,21,34,…

Write a Prolog predicate fib(N, Y) to calculate any term of the sequence.

Q (a) Below is a simplified diagram of neuron connections in a brain. Provide a simple

description of each of the terms in the diagram.

(b) What is a perceptron? Draw a diagram for a single-layer two-input perceptron.

Explain what is meant by linear separability. How many categories can it classify

inputs into? Mention any issues involved in using a perceptron to compute logical

AND, OR and XOR.

(c) Draw a multilayer perceptron diagram that would be appropriate for an XOR gate.

Name and draw the activation function which is suitable for a multilayer perceptron.

Comment briefly on its learning algorithm.

(d) Illustrate the single perceptron training algorithm by computing the weight

adjustments for the first two epochs in the table below.

Perceptron Training for logical OR

Threshold 𝜃 = 0.2 , learning rate 𝛼 = 0.1.

Soma Soma

Synapse

Synapse

Dendrites

Axon

Synapse

Dendrites

Axon

Page 4 of 7

Epoch Inputs Desired output

Yd

Weights

Weighted sum

Actual Output

Y

Error

e

Weight adjustments

x1 x2 w1 w2 X Δw1 Δw2

1 0 0 0 0.3 -0.1

0 1 1

1 0 1

1 1 1 2 0 0 0

0 1 1

1 0 1

1 1 1 3 0 0 0

Q (a) Using a diagram and some comments, describe how an artificial neuron operates as a

simple computing element. Mention two different activation functions in your answer.

(b) In a multilayer perceptron, describe what is meant by feedforward and

backpropagation. Outline how feedforward might be implemented in a language like

Java (no code required).

(c) Describe how a multilayer perceptron could be trained and afterwards used when

presented with a large training data set.

(d) llustrate how a perceptron that acts as an OR gate is trained by computing the weight

adjustments for the first two epochs in the table below.

Perceptron Training for logical OR

Threshold 𝜃 = 0.2 , learning rate 𝛼 = 0.1.

Epoch Inputs Desired output

Yd

Weights Actual Output

Y

Error

e

Weight adjustments

x1 x2 w1 w2 Δw1 Δw2

1 0 0 0 0.3 -0.1

0 1 1

1 0 1

1 1 1 2 0 0 0

0 1 1

1 0 1

1 1 1 3 0 0 0

Page 5 of 7

Q (a) Explain breifly each of the following in the context of machine learning:

supervised learning

classification

regression

clustering.

(b) Mention four approaches to machine learning and briefly decribe two of them.

(c) In the context of supervised learning, suppose a 200 record data set was presented to a

learning algorithm, suggest how the set might be divided into 3 groups for training,

validation and testing and what is meant by these terms.

(d) In diagram 1 below there are 20 squares and 40 triangles. Diagram 2 show the same

distribution plus an extra input whose shape is unknown and a neighbourhood of the

input which has 3 squares and 1 triangle. Using the data from the diagrams, illustrate

how Naïve Bayes Classification works in deciding whether the input can be classified

as a square or triangle.

The Bayes formula is

𝑃(𝐻|𝐸) = 𝑃(𝐻)𝑃(𝐸|𝐻) 𝑃(𝐸)⁄

Diagram 1

Diagram 2

Page 6 of 7

Q (a) In early AI research general problem solving methods were investigated which made

the assumption that many problem domains could be characterised as a finite “state

space” in which the problem solver could “operate” by moving from one state to

another, making an allowed move.

Discuss this from the perspective of the farmer-wolf-goat-cabbage (fwgc) problem

and include in your answer the state space graph for this problem.

(couold be missionaries-cannoibals MC)

(b) Show how a fwgc (MC) state could be represented in Prolog and write some code for

generating allowed moves.

(c) Write a Prolog predicate solve/3 which could be used to find a solution path for the

fwgc or any other similar problem.

(d) Explain how an 8-puzzle state could represented in Prolog and use your scheme to

represent the following state.

(e) Could the code from part (c) be used to solve the 8-puzzle and if so would there be

any major limitation were it to be applied to the 8-puzzle? If such a limitation exists in

solve/3, describe a way (code not necessary) of overcoming it.

(a) In the early days of AI a research group in attempting to describe the semantics

underlying language invented a notation called Conceptual Dependency (CD).

Describe with the aid of simple examples what the following CD action primitive

represent.

atrans

ptrans

mtrans

propel

Mention two criticsim of Conceptual dependency.

(b) Dear CD diagram for “to hit” and then a more specific one for “Mary punched John”.

In what way if any would the CD of “Mary hit John with her fist” differ from this.

(c) Descrrbe what is meant by a Script in Procedural Knowledge Representation and

provide an example.

1 2 3

8

5

7 4 6

Page 7 of 7

(a) What is meant by the Physical Symbols Hypothesis in AI?

(b) List three approaches to machine learning and describe one of them in general terms.

(c)