You are on page 1of 5

Student Name (in English): __________________________________________ Student ID: ________________________

Al Imam Mohammad Ibn Saud Islamic University


College of Computer and Information Sciences
Computer Science Department
Course Title: Artificial Intelligence
Course Code: CS340
Course Prof. Hashemi Benneceur, Dr. Abdullah Sheddy,
Instructor: T.Mashael Almedlej
Exam: Midterm
Semester: 1st Semester
Date: 24/11/2016
Duration: 60 Minutes
Marks: 20
Privileges: ☐ Open Book ☐ Open Notes
☐ Calculator Permitted ☐ Laptop Permitted

Student Name (in English): Model

Student ID:
Section No.:

Instructions:
1. Answer all questions; there are 4 questions in 5 pages.
2. Write your name on each page of the exam paper.
3. Write your answers directly on the question sheets. Use the ends of the question pages
for rough work or if you need extra space for your answer.
4. If information appears to be missing from a question, make a reasonable assumption,
state your assumption, and proceed.
5. No questions will be answered by the invigilator(s) during the exam period.

Official Use Only


Question Student Marks Question Marks
1
2
3
4
Total 20

Question 1: To be answered in (8) Minutes [ ] / 5 Marks

Page 1 of 5

Imam University | CCIS | Vice Deanery of Development and Quality


Doc. No. 006-01-20140514
Student Name (in English): __________________________________________ Student ID: ________________________

I. Fill in the Table below with the correct choice. [3]

1 2 3 4 5 6

1. The environment type of Playing Chess with Clock is:


a. Fully observable
b. partially observable
c. static Environment
2. The environment where the agent has a limited number of distinct, clearly
defined percepts and actions.
a. Deterministic
b. Continuous
c. Discrete
3. Multi-agent environment has agents that might be...
a. Competitive
b. Cooperative
c. Both a & b
4. Which of the following techniques uses randomness for avoiding getting
trapped in local maxima?
a. Best first search
b. Simulated annealing
c. Local beam search
5. The A* algorithm is preferred over greedy best-first search in terms of
a. Time Complexity
b. Optimality
c. Space Complexity
6. Achieving arc-consistency algorithm on a CSP leads to a unique solution
of the CSP if
a. Every variable has at lease one remaining value in its domain.
b. Every variable has exactly one remaining value in its domain.
c. Exist a variable with an empty domain.

II. In order to design an agent specialized in translating spoken languages, describe


its PEAS. [2]

Task Performance Measure Environment Actuators Sensors

Correctness, ease of use, people Display, Keyboard,


Translator

speed speaker microphone

Question 2: Search To be answered in (25) Minutes [ ] / 7 Marks

Page 2 of 5

Imam University | CCIS | Vice Deanery of Development and Quality


Doc. No. 006-01-20140514
Student Name (in English): __________________________________________ Student ID: ________________________

I. For an agent that is designed to play the Tower of Hanoi game which is a
stack of disks of varying sizes are moved from one peg to another. The
diagram below shows the start and goal states for 3 disk/3 peg version.
The rules of the game are that a disk may only be moved if it is on the top
of a stack, and it can only be placed on an empty peg or a larger disk. [3]

For the problem above, when formulated as a state space, what are the
following?
1. Initial state: S1:{D1, D2, D3}, S1:{ }, S3:{ } --> (given state a )
2. Action:
Disk Di can be moved from Si to Sj if:
- Di is the topmost disk on Si
- Si is either empty, or the size of the topmost disk of Sj , Dj, is greater than
Di
3. Goal state: S1:{ }, S1:{ }, S3:{ D1, D2, D3 } --> (given state b)
4. Cost: 1 per move

II. What is the difference between the cost function g(n) and heuristic
function h(n) as the main parts of the A* evaluation function? [1]
g(n) returns the actual cost from start node to current node, h(n) returns the
estimated cost from current node to goal.

III. Consider the following state space; S is the initial state and G is the goal
state and each arc is labeled by the cost of traversing it. [3]

Fill in the table below with


3 S 1
suggested values of heuristic
functions h1 and h2 in such a way
that the TREE-SEARCH A* when A B
using h1 finds a suboptimal
solution but when using h2 finds 2 3
G
an optimal solution (do not solve
the problem).

S A B G
Heuristic h1 3 1 5 0
Heuristic h2 3 2 2 0

Page 3 of 5

Imam University | CCIS | Vice Deanery of Development and Quality


Doc. No. 006-01-20140514
Student Name (in English): __________________________________________ Student ID: ________________________

Question 3: Games To be answered in ( ) Minutes [ ] / 4Marks

Consider the following game tree in which the heuristic scores at the leaf
nodes are all from MAX player.

1. Which move player MAX will choose using Minimax algorithm?


[1]

2. What other algorithm you can suggest to reduce the time taken by the
Minimax algorithm?
[1]

Alpha-beta

3. Which nodes won't be explored with the new algorithm when MAX
attempt his first move? Show the cuts on the tree. [2]

Page 4 of 5

Imam University | CCIS | Vice Deanery of Development and Quality


Doc. No. 006-01-20140514
Student Name (in English): __________________________________________ Student ID: ________________________

Question 4: CSP Choice 1 To be answered in (25) Minutes [ ] / 4 Marks

Choice 1

Consider the following constraint satisfaction problem represented in the


following constraint graph:

1. What is the size of the search space of this CSP? [1]

54 = 625
2. Perform the arc-consistency algorithm on the CSP, draw your conclusion.
[3]

A = 2,3,4 B = 1,2,3 C = 3,4,5 D = 2,3,4

Page 5 of 5

Imam University | CCIS | Vice Deanery of Development and Quality


Doc. No. 006-01-20140514

You might also like