You are on page 1of 6

THE SUPERIOR UNIVERSITY LAHORE

dd
Mid - Term Exam (Solution)
Semester-6th
(Spring2022)
Faculty of Computer Science and Information Technology QCH: Dr. Sohail
Subject: Artificial Intelligence Marks Obtained:
Instructor: Dr. Sohail, Ms. Maryam Total Marks: 20

Instructions:
Name: ___________________
1. No cutting or overwriting is allowed.
Roll No: _________________
2. Use of mobile phone is strictly prohibited.
Date: ___________________ 3. No extra time will be given.

Time Allowed: Min. 90

PART -I [5*1=5]
Q#1: Attempt the short question answer.
1. Construct a table and define the Artificial Intelligence in the perspective of acting and
thinking with humanly and rationally parameters.
Solution:

Definition Explanation

Thinking Rationally Law of thoughts

Thinking Humanly Cognitive approach

Acting Rationally rational agent approach

Acting humanlly Turing Machine

2. What is the total Turing test ? Also mentioned the name of its six basic elements that
provided help to pass this test?
Solution: Turing’s test deliberately avoided direct physical interaction between the interrogator
and the computer, because physical simulation of a person is unnecessary for intelligence.
However, the so-called total Turing Test includes a video signal so that the interrogator can test
the subject’s perceptual abilities
Elements of turing:
1. natural language processing ; 2. knowledge representation; 3. automated reasoning
4. machine learning; 5. computer vision; 6. Robotics
3. Design PEAS environment of Interactive English tutor.
Solution:

Agent type Performance Environme Actuator Sensor


nt

Interactive Student’s Set of Display of Keyboard entry


English tutor. score students,
testing exercises,
on test agency suggestions

4. Write the name of 4 basic parameters, which help to measure the performance elements
of any searching algorithm.
1. completeness 2. optimality 3. time complexity 4. space complexity
5. Differentiate between uninformed and informed algorithm. write the names of all
algorithm , which exist inside these searching algorithms.
Solution:
Informed algorithm: know about the knowledge of full domain, while uninformed only aware
about current situation , no future knowledge. Uninformed algorithm; BFS, DFS, uniformed
search , IDS, limited search, bidirectional search; Informed search algorithms are: GBFS, A*,
etc.
PART-II [Total=8]
Q#2: Give answers of the following questions that are relevant with searching algorithms:

1. IS it possible to make A* admissible? If possible give it proof with the help of example. (4)
Solution: we can prove it by using the following statement:
h(n) <= h*(n) ; underestimation
h(n) >= h*(n) ; over estimation
OR
Design a flow chart of genetic algorithm.
Solution:Initial population → calculate fitness→ selection→ cross over→ mutation→
optimal soln stop otherwise start from initial.
2. Perform Alpha-beta pruning mechanism on the given graph. You have to mention each
step wise detail from initialization of variables to the end of getting optimal result. (4)

Solution:
C now returns the value of 1 to A here the best value for A is max (3, 1) = 3. Following is the
final game tree which is the showing the nodes which are computed and nodes which has never
computed. Hence the optimal value for the maximizer is 3 for this example.

3. Write a pseudo-code of Hill-climbing or DFS. Here, you have to select one algorithm for
writing a pseudo-code and answer the following parameters such as completeness, optimal, time
complexity or beta factor if exists of that particular pseudo-code.

Solution:
Part-III [Total=7]
Q#3: solve the problem by answering the following questions:
In the water jug problem in Artificial Intelligence, we are provided with two jugs: one
having the capacity to hold 3 gallons of water and the other has the capacity to hold 4 gallons of
water. There is no other measuring equipment available and the jugs also do not have any kind
of marking on them. So, the agent’s task here is to fill the 4-gallon jug with 2 gallons of water by
using only these two jugs and no other material. Initially, both our jugs are empty.

1. Give goal and problem formulation by using each single steps. (3)

2. Which one agent type is used in this environment? (1)

3 construct the working environment of an agent. (3)


OR
Write pseudo-code of selected agent type.

Solution:

1. Goal formulation: (x,y) without capacity mark→ (2,y) or (x,2)


Problem formulation: (x,y) → (4,y) , (x,y) → (X,3) , (x,y) → (x, y-(4-x)) , (x,y) → (x-(3-x),
y)
2. Goal based

3. Working environment

You might also like