1. 1
CS 471 TEST ONE ( 2025)
INSTRUCTIONS
Answer all questions in the space provided. Anything written outside the provided space will
not be marked. Total Mark is 100. Marks are indicated beside each question. Time allowed
is 2 hours.
PERSONAL DETAILS
NAME:__________________________________________ ID:_______________________
Question One
For each sentence, indicate whether it is true or false. [1 mark each]
i. The Turing test evaluates a system’s ability to act rationally. _____________________
ii. A simple reflex agent can be rational. _______________________
iii. A “rational agent” is one that always performs the best action in a given situation.
__________________
iv. It is impossible for an agent to act rationally in a partially observable environment.
__________________
v. A nominally fully observable environment can be rendered partially observable due to
errors and noise in an agent's sensors. ______________________
vi. Chess and checkers are examples of games that have a partially observable environment.
_____________________
vii. An agent's environment is said to be stochastic if the next state is completely determined
by the current state and the agent’s action. ___________________
viii. Minimax with and without alpha-beta pruning can sometimes return different results.
____________________
ix. The alpha-beta algorithm is preferred to minimax because it computes the same answer as
minimax while usually doing so without examining as much of the game tree.
__________________
x. Alpha-beta pruning can alter the computed minimax value of the root of a game search tree.
__________________
xi. In A* search, the first path to the goal which is added to the fringe will always be optimal.
____________________
xii. A greedy search uses a heuristic function to expand the node that appears to be closest to
the goal. __________________
xiii. A search algorithm is complete if it always finds a solution if there is one.
____________________
xiv. The minimax algorithm (and its variant alpha-beta) can only be applied to zero-sum games.
(In zero-sum game, if one player wins, the other loses). ________________________
xv. In a game tree where each player has Y possible moves at every turn, the number of leaf
nodes at level X is given by YX. ____________________________
2. 2
Question Two
a) A student is developing a robot that can roll a die. The robot grips and releases the die with
an arm that can also twist, and uses two cameras that can see the entire rolling area at once
for feedback. The goal is to develop methods that can roll the die in a way that increases
the chance of landing on a desired side of the die. Please consider the environment, that is
the robot, die, and rolling area. Is this environment (justify your answers!):
Fully observable? ____________________ Reason: ______________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Deterministic? ____________________ Reason: ________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Episodic? ____________________ Reason: ____________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Static? ____________________ Reason: _______________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Discrete? ____________________ Reason: _____________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
[5 marks]
b) Now consider the case that the robot from (a) is being programmed to roll dice in a
competitive game. A group of robots are all collected into one area, and each given a die.
If a robot rolls a die that brings the sum of rolled values to an even number, that robot is
eliminated from the running. These games are played again and again with the robots that
haven’t been eliminated until only one winner remains. The rolling area has been expanded
to accommodate the other robots, and as a result, the robot now has to sweep this larger
area in order to see all of the already rolled dice. In addition, the robots don’t have to take
turns. The robot should be constantly strategizing over what kind of roll to perform
3. 3
depending on the values of the other dice that have already been rolled. Which of the
answers to the previous question have been changed, and why? [2 marks]
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
c) Consider a computer program that is playing online tic-tac-toe. Is the environment of this
intelligent agent (justify your answers!):
Fully observable? ____________________ Reason: ______________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Deterministic? ____________________ Reason: ________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Static? ____________________ Reason: ______________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Discrete? ____________________ Reason: ___________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
[4 marks]
4. 4
d) Consider a self-driving car as an intelligent agent. Name two items for each of the PEAS
elements.
Performance measures: [1]_______________ __________________________________
________________________________________________________________________
________________________________________________________________________
[2]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Environment:[1] __________________________________________________________
________________________________________________________________________
________________________________________________________________________
[2]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Actuators: [1] ___________________________________________________________
________________________________________________________________________
________________________________________________________________________
[2]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Sensors: [1] ____________________________________________________________
________________________________________________________________________
________________________________________________________________________
[2]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
[8 marks]
e) Consider a medical diagnosis system (A medical diagnosis system that helps healthcare
professionals identify diseases or conditions by analysing patient data to provide accurate
and timely diagnoses). Name item(s) for each of the PEAS elements.
Performance measure (2 items): [1] ___________________________________________
________________________________________________________________________
________________________________________________________________________
[2]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Environment (2 items): [1] __________________________________________________
________________________________________________________________________
________________________________________________________________________
5. 5
[2]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Actuator (1 item): [1] _____________________________________________________
________________________________________________________________________
________________________________________________________________________
Sensor (1 item): [1] ______________________________________________________
________________________________________________________________________
________________________________________________________________________
Question Three (Blind Search Methods)
a) When formulating a search problem in AI, six (6) pieces of information must be provided.
State these six pieces of information. [6 marks]
[1]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
[2]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
[3]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
[4]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
[5]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
[6]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
b) Consider the description of the farmer, wolf, goat and cabbage problem:
A farmer with his wolf, goat, and cabbage come to the edge of a river they wish to cross.
There is a boat at the river's edge, but, of course, only the farmer can row. The boat also
can carry only two things (including the rower) at a time. If the wolf is ever left alone with
the goat, the wolf will eat the goat; similarly, if the goat is left alone with the cabbage, the
goat will eat the cabbage.
Represent this as a search problem. [6 marks]
7. 7
c) Consider the search tree below and answer the questions that follow.
i. What is the depth of node Q? _________________________
ii. How many open nodes are shown in the tree? _________________________
iii. How many closed nodes are shown in the tree? _________________________
[1 mark each]
d) Consider the search graph below, where S is the start node and G1 and G2 are goal nodes.
Arcs are labelled with the cost of traversing them and the estimated cost to a goal is reported
inside nodes.
8. 8
Assume the following:
When placing expanded child nodes on a queue, the child nodes are placed
in alphabetical order.
We never generate child nodes that appear as ancestors of the current node in the search
tree.
For each of the search strategies listed below, indicate which goal state is reached (if any)
and list, in order, the states expanded. Show your working.
i. Breadth First [3 marks]
ii. Depth First [7 marks]
9. 9
iii. Uniform Cost [5 marks]
Question Four (informed Search methods)
a) State briefly the difference between Informed search and blind search methods. [2 marks]
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
b) State briefly the main difference between Greedy Search and A* Search. [2 marks]
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
11. 11
What is the order that A* search will expand the nodes? (Show your working)
[7 marks]
Question Five (Adversarial Search)
a) State briefly the two rules to follow when carrying out alpha-beta pruning. [4 marks]
[1]_____________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________