



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Main points of this exam paper are: Forward-Chaining, Alphabetical Order, Depth-First Search, Iterative Deepening, Best-First Search, Hill Climbing, Beam Search
Typology: Exams
1 / 6
This page cannot be seen from the preview
Don't miss anything!
Write your answers on these pages and show your work. If you feel that a question is not fully specified, state any assumptions you need to make in order to solve the problem. You may use the backs of these sheets for scratch work.
Write your name on this and all other pages of this exam. Make sure your exam contains six problems on six pages.
Name ________________________________________________
Student ID ________________________________________________
Problem Score Max Score
Total _____ 100
Consider the search graph drawn below; the start and goal states are labeled. Note that arcs are directed. For each of the search strategies listed below, indicate which goal state is reached (if any) and list, in order, the states expanded. (A state is expanded when it is removed from the OPEN list.) When all else is equal, nodes should be expanded in alphabetical order.
Start
A B
C D
E
Goal
Goal
1
1 4
1
5
7 3
2
6
10
11
3 2
7
KEY
cost of traversing this arc is X
estimated cost to nearest 15 goal is Y
14
13 11
4
0
0
3
21
Y
X
14 F
Goal state reached: _____ States expanded: ____________________________________
Goal state reached: _____ States expanded: ____________________________________
Goal state reached: _____ States expanded: ____________________________________
Goal state reached: _____ States expanded: ____________________________________
Goal state reached: _____ States expanded: ____________________________________
Would the h function in this graph lead to an admissible search? ______
Explain your answer:
a) Consider the following Prolog rulebase:
p(1,2). p(3,3). p(2,1). q(1,2). q(2,1). q(2,2). q(3,3). r(2,1). r(2,2). s(X1,Y1) :- p(X1,Y1), q(Y1,X1), r(X1,X1). s(X2,Y2). r(X3,Y3) :- q(X3,Y3). w(X4,Y4) :- p(X4,Y4), q(2,Z4), r(X4,Z4).
For the following queries, report the answers that Prolog a requested answer. Report fail is Prolog would not be able to find a requested answer.
i) ?- s(2,1). First Binding List Found: _____________________________
Second Binding List (if one): _____________________________
Third Binding List (if one): _____________________________
ii) ?- w(U,V). First Binding List Found: _____________________________
Second Binding List (if one): _____________________________
Third Binding List (if one): _____________________________
b) Write a Prolog program for sisters(X,Y) , which determines if X and Y are sisters. You may only assume that the predicates grand_parent(X,Y) , parent(X,Y) , ancestor(X,Y) , male(X) , female(X) , tall(X) , young(X) , older_than(X,Y) , and different(X,Y) are defined. Different(X,Y) is true when X and Y have been bound to different constants; the semantics of the other predicates should be obvious (the binary ones, predicate(X,Y) , can be read ‘‘ X is a predicate of Y ’’).
In the space below, provide brief and succinct summaries of the importance of the following AI concepts.
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
horizon effect
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
interacting subgoals
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
negation-by-failure
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Assume that a game has a static-board evaluator (SBE) that only returns one of three values: -1 (lose), 0 (draw), and 1 (win). Consider the game tree drawn below. What is the fewest possible number of calls to the SBE? To illustrate your answer, label those leaf nodes that would have to be called with the score that the SBE would have to return. (If you feel there are several way that the fewest calls could occur, you need only show one of them.)
maximizer
minimizer
maximizer