Docsity

Psuedocode - Artificial Intelligence - Old Exam Paper, Exams of Artificial Intelligence

Toggle sidebar
bg1
Page 1 of 5
CORK INSTITUTE OF TECHNOLOGY
INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ
Semester 1 Examinations 2010/11
Module Title: Artificial Intelligence
Module Code: COMP8006
School: Science & Computing
Programme Title:
Bachelor of Science (Honours) in Software Development – Award
Bachelor of Science (Honours) in Software Development and Computer Networking – Award
Programme Code: KSDEV_8_Y4
KDNET_8_Y4
External Examiner(s): Ms. Deirdre Lawless
Internal Examiner(s): Dr. J. Stynes
Instructions: Answer any four questions. Show all work.
Duration: 2 Hours
Sitting: Winter 2010
Requirements for this examination:
Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have received the
correct examination paper.
If in doubt please contact an Invigilator.
pf3
pf4
pf5

Partial preview of the text

Download Psuedocode - Artificial Intelligence - Old Exam Paper and more Exams Artificial Intelligence in PDF only on Docsity!

CORK INSTITUTE OF TECHNOLOGY

INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ

Semester 1 Examinations 2010/

Module Title: Artificial Intelligence

Module Code: COMP

School: Science & Computing

Programme Title: Bachelor of Science (Honours) in Software Development – Award Bachelor of Science (Honours) in Software Development and Computer Networking – Award

Programme Code: KSDEV_8_Y KDNET_8_Y

External Examiner(s): Ms. Deirdre Lawless Internal Examiner(s): Dr. J. Stynes

Instructions: Answer any four questions. Show all work.

Duration: 2 Hours

Sitting: Winter 2010

Requirements for this examination:

Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have received the correct examination paper. If in doubt please contact an Invigilator.

a

Q1. (a) Distinguish between state space search and adversarial search, indicating the similarities and differences between these approaches. (5 marks)

(b) Outline in psuedocode the minimax procedure used in adversarial search. What refinements can be applied to the minimax algorithm for searching game trees? Explain. (8 marks)

(c) Apply minimax to the game tree in Figure 1. Which move should be chosen if the root is a maximizing player? Which move should be chosen if the root is a minimizing player? (4 marks)

(d) Apply alpha-beta pruning to the game tree in Figure 1, where static scores are from the maximising player’s point of view. Which nodes need not be examined in a left to right alpha-beta pruning? Which nodes need not be examined in a right to left alpha-beta pruning? (8 marks)

a1 a2 a

b c d e f g h i

j k l m n o p q r s t u v w x y z

5 8 6 9 4 4 2 6 7 5 3 5 9 7 8 8 6

Figure 1

water may be added. Does there exist a sequence of pouring which leaves four litres of water each in jugs A and B? Model this problem as a production system and provide a sample problem solving trace. (1 1 marks)

Q4. (a) Why are standard probability models unsuitable for performing medical diagnosis given observations of a patient’s symptoms? Briefly discuss one alternative approach to handling such uncertainty. Explain how uncertainty is propagated through the system, i.e., how are new uncertain beliefs/evidence combined? Illustrate with examples. (15 marks)

(b) What conditions are required for Nilsson’s algorithm to work in finding a minimal cost solution tree for a weighted AND/OR graph? Provide two examples where the algorithm either failed to find a solution or found an unreasonable one due to the failure to meet these conditions.. (10 marks)

Q5. (a) Will the following Prolog matching operations succeed or fail? Indicate the resulting variable instantiation(s) when the operation succeeds. (i) [3,7,X] = [A,7,3] (ii) [H|T] = [[a,b,c],[1,2,3]] (iii) likes(tweety,goldie) = like(A,B) (iv) [5,X]=[X,10] (v) [H1,H2|T] = [tweety, goldie] (8 marks)

(b) Transform the following expression into clause form: (xyz q(z,y,x) )(  x {y [ p(x,y)q(x,y) ] } ) (8 marks)

(c) Formulate the following as first order predicate calculus formulas and use the method of resolution and refutation to determine the validity of the conclusion. “Anyone who passes his exams and wins a lottery is happy. Anyone who studies or is lucky will pass his exams while anyone who is lucky wins a lottery. Jane is lucky but did not study. Therefore, Jane is happy.” (9 marks)

Q6. (a) Given the following Prolog code: p(X,Y):- r(X), s(Y), t(X,Y). /Rule 1 / p(5,10) :- !. p(10,20). r(X) :- member(X,[4,6,9,15]). s(X) :- member (X,[3,5,4,2]). t(X,Y) :- Z is X + Y, Z mod 2 is 0. member(X,[X|]). member(X,[|Tail]) :- member(X,Tail). What is the Prolog response to ?-p(X,Y), write(X), tab(3), write(Y), nl, fail. Give the results of the same query if Rule 1 is replaced by (i) p(X,Y) :- !, r(X), s(Y), t(X,Y). (ii) p(X,Y) :- r(X), s(Y), !, t(X,Y). (iii) p(X,Y) :- r(X), !, s(Y), t(X,Y), !. (12 marks)

(b) Develop a Prolog solution to the Eight Queens Problem: place eight queens on an empty 8x8 chessboard such that no queen attacks any other queen. A queen can attack another queen on the same row or same column or same diagonal on the chessboard. (13 marks)