Prolog Programming & AI: Examining Problem-Solving & Knowledge Representation, Exams of Artificial Intelligence

A 3-hour exam from the bachelor of science (honours) in software development program at the cork institute of technology, covering topics such as prolog programming, physical symbol system hypothesis, state-space representation, minimax algorithm, artificial neural network systems, and common-sense knowledge representation in artificial intelligence. The exam is divided into six questions, each focusing on different aspects of these topics, with a mix of theoretical explanations, code writing, and problem-solving.

Typology: Exams

2012/2013

Uploaded on 03/24/2013

bakula
bakula 🇮🇳

4.4

(5)

35 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Cork Institute of Technology
Page 1 of 4
Bachelor of Science (Honours) in Software Development – Award
(NFQ Level 8)
Summer 2006
Artificial Intelligence
(Time: 3 Hours)
Answer question any FOUR questions
(All questions carry equal marks).
Examiners: Dr. M. O’Cinneide
Mr. M. Donnelly
Mr. P. Rothwell
1. (a) Using the following program and query as an example write a general
description of Prolog in terms of its syntax, list handling, and the use of
recursion. Include a brief description of the effect of this program.
prog( _, [] ,[]).
prog(L2, [ [X,Y] | L1], [Y | T]):- member(X, L2), prog(L2, L1, T),!.
prog(L2,[ _ | L1], L3):- prog(L2, L1, L3),!.
?- prog([p, f, d, a, g, c], [[a,p], [b,q], [c, r]], L). [10 marks]
(b) The following Prolog program can be used to solve the N-Queens problem:
%gen(X,Y,L) generates a list L of integers from X to Y
nqs(N,S):- gen(1,N,Dxy), Nu1 is 1-N, Nu2 is N-1, gen(Nu1,Nu2,Du),
Nv2 is N+N, gen(2,Nv2,Dv), sol(S,Dxy,Dxy,Du,Dv).
Sol([],[],Dy,Du,Dv).
Sol([Y|Ylist],[X|Dx1],Dy,Du,Dv):-
del(Y,Dy,Dy1), U is X-Y, del(U,Du,Du1), V is X+Y,
del(V,Dv,Dv1), sol(Ylist,Dx1,Dy1,Du1,Dv1).
In your own words, explain how the above program would try to generate a
solution S for the four queens problem. Include an explanation of each part
of the program in terms of the representation being used.
[10 marks]
(c) Write and explain the Prolog code to define the predicate gen(X,Y,L) as used
in the above program. [5 marks]
[Total: 25 marks]
pf3
pf4

Partial preview of the text

Download Prolog Programming & AI: Examining Problem-Solving & Knowledge Representation and more Exams Artificial Intelligence in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Science (Honours) in Software Development – Award

(NFQ Level 8)

Summer 2006

Artificial Intelligence

(Time: 3 Hours)

Answer question any FOUR questions (All questions carry equal marks).

Examiners: Dr. M. O’Cinneide Mr. M. Donnelly Mr. P. Rothwell

  1. (a) Using the following program and query as an example write a general description of Prolog in terms of its syntax, list handling, and the use of recursion. Include a brief description of the effect of this program.

prog( _, [] ,[]). prog(L2, [ [X,Y] | L1], [Y | T]):- member(X, L2), prog(L2, L1, T),!. prog(L2,[ _ | L1], L3):- prog(L2, L1, L3),!.

?- prog([p, f, d, a, g, c], [[a,p], [b,q], [c, r]], L). [10 marks]

(b) The following Prolog program can be used to solve the N-Queens problem:

%gen(X,Y,L) generates a list L of integers from X to Y nqs(N,S):- gen(1,N,Dxy), Nu1 is 1-N, Nu2 is N-1, gen(Nu1,Nu2,Du), Nv2 is N+N, gen(2,Nv2,Dv), sol(S,Dxy,Dxy,Du,Dv).

Sol([],[],Dy,Du,Dv). Sol([Y|Ylist],[X|Dx1],Dy,Du,Dv):- del(Y,Dy,Dy1), U is X-Y, del(U,Du,Du1), V is X+Y, del(V,Dv,Dv1), sol(Ylist,Dx1,Dy1,Du1,Dv1).

In your own words, explain how the above program would try to generate a solution S for the four queens problem. Include an explanation of each part of the program in terms of the representation being used. [10 marks]

(c) Write and explain the Prolog code to define the predicate gen(X,Y,L) as used in the above program. [5 marks]

[Total: 25 marks]

  1. (a) Outline the physical symbol system hypothesis. [5 marks] Briefly discuss its importance. [5 marks]

(b) “Problems with logic have led AI researchers to try to develop schemes of representation, based on logic, that can capture more human commonsense reasoning capabilities.” Give an example of such a problem with logic. Briefly characterise the ‘semantic networks’ representation scheme. Explain why loosely defined inference links in semantic networks led to problems. [9 marks]

(c) Briefly characterise the ‘conceptual dependency’ representation scheme. Briefly explain how ‘conceptual dependency’ attempted to improve on the ‘semantic networks’ scheme. [6 marks]

[Total: 25 marks]

  1. (a) Define and explain a full state-space representation of the states and operators that you would use in attempting to solve the following “balloon problem.” [8 marks]

A parent and two children are on the southern side of a canyon filled with crocodiles. Their only way across is a hot air balloon which must be manned and can only carry 100kg at a time. The parent weighs 80kg and the children weigh 45kg each. Is there a sequence of moves that would allow the family to travel to the northern side safely?

(b) Based on the representation in part (a) above, outline the essentials of a Prolog program that would solve the problem. [10 marks]

(c) Explain the operation of your program in part (b) above. [7 marks]

[Total: 25 marks]

  1. (a) List and briefly explain AI’s main motivations for attempting to represent common-sense knowledge. [3 marks]

(b) The Frame Problem is seen as a serious impasse for logic-based knowledge representation. Fully explain the frame problem using examples. [8 marks]

(c) Hubert Dreyfus criticises attempts to represent common-sense knowledge using a formal propositional knowledge representation language. Describe and explain the argument he gives in support of his criticism. [10 marks] There is an alternative way of attempting to represent common-sense knowledge. Briefly discuss this alternative. [4 marks]

[Total: 25 marks]