Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Instructions
Carefully read these instructions! Seriously!
This exam must be solved individually. Cheating in the exam will be handled according to the regulations
of the University of Puerto Rico.
You can use only a sheet of formulas. You are not allowed borrow from or lend to anyone any material. Make
sure your pen has enough ink, or if you use pencil bring your own eraser.
You are not allowed to use calculator or computer – you do not need them anyway.
Turn off your cellular phone to avoid disturbing your classmates and yourself. You must keep it in your
pocket or backpack at all times.
You are not allowed to use any kind of electronic device during the exam – MP3 players, tablet
computers, cellular phones, beepers, laptops, etc. If you take any electronic device in your hands during the
exam, your action may be treated as an attempt to cheat.
Make sure your handwriting is legible. I will make a reasonable effort, when grading, to understand your
answers, but I may take off credit when I cannot fully understand your handwriting.
Suggestions
You may answer the exam in English or Spanish, as you feel comfortable.
State clearly any assumption you may need to solve any problem.
Divide your time proportionately to the points of each problem. If the time you assigned for one question
expires, go on solving another question. You may get partial credit for correct processes towards the
solution of a problem, but only if the process is correct. You may attempt to finish incomplete problem
solutions if you have time left before handing in your exam.
Warm up questions
1. Match the correct statements (10 points):
According to the four visions of Artificial Intelligence, an agent that
TRUE
FALSE
TRUE
FALSE
In Tic Tac Toe two rational agents always tie the game.
4. The environment for a Monopoly player agent is (select all that apply) (10 points)
f. Episodic g. Sequential
k. Discrete l. Continuous
o. Known p. Unknown
q. Competitive r. Collaborative
5. Depth-first is (Select all that apply or fill in the blanks (10 points):
Describe any assumptions or constraints for optimality or completeness and explain the
terms for space and time complexity and justify your choices
Depth-first search is neither complete nor optimal regardless of any assumption. 𝑏 is the
branching factor and 𝑚 is the maximum depth of the graph.
6. Breath-first search is (Select all that apply or fill in the blanks) (10 points):
Describe any assumptions or constraints for optimality or completeness and explain the
terms for space and time complexity, and justify your choices
For the breath-first search to be complete it is necessary to assume that 𝑏 is finite.
Optimality assumes that the costs of all the branches are identical. 𝑏 is the branching factor
and 𝑑 is the depth of the solution.
7. Figure 1 shows four graphs where the number inside the nodes represent the value of the heuristic
function ℎ(𝑛) for node 𝑛, an estimation of the distance from node 𝑛 to the goal. The number on the
arcs represents the actual distance function 𝑔(𝑛) traveled along each arc. Write on the side of each
graph if ℎ(𝑛) is admissible or consistent – it could be both or none - (10 points).
Problem
8. Consider the state space shown in Figure 2, where A is the starting state, L satisfies the goal test. The
labels of each arc represent the cost of traversing them. The estimated cost to a goal is given inside
each node. For each of the following search strategies, indicate whether the goal state is reached, and
which nodes are in the explored set at the end of the execution. In case of ties, chose the next node
in alphabetical order.
1. 0/A/{}
2. 0//{A}
3. 1/A/{}
4. 1/B C D/{A}
5. 1/B C/{A D}
6. 1/B/{A C D}
7. 1//{A B C D}
8. 2/A/{}
9. 2/B C D/{A}
10. 2/B C I/{A D}
11. 2/B C/{A D I}
12. 2/B E F/{A C D I}
13. 2/B E/{A C D F I}
14. 2/B/{A C D E F I}
15. 2/G/{A B C D E F I}
16. 2//{A B C D E F G I}
17. 3/A/{}
18. 3/B C D/{A}
19. 3/B C I/{A D}
20. 3/B C K/{A D I}
21. 3/B C/{A D I K}
22. 3/B E F/{A C D I K}
23. 3/B E/{A C D F I K}
24. 3/B H/{A C D E F I K}
25. 3/B/{A C D E F H I K}
26. 3/G/{A B C D E F H I K}
27. 3/L/{A B C D E F G H I K}
28. 3//{A B C D E F G H I K L(Goal)}
Iterative deepening finds the optimal solution by pure chance because the Frontier
queue does not take into consideration distance; it finds the shallowest solution which
in this case happens to be also optimal in distance (See detail above)
A* Search Frontier (𝑓(𝑛) = ℎ(𝑛) + 𝑔(𝑛))/Explored set
1. A(22+0)/{}