Docsity

Iterative Deepening - Artificial Intelligence - Exam, Exams of Artificial Intelligence

Toggle sidebar
bg1
CS 540-1: Introduction to Artificial Intelligence
Exam 1: 7:15-9:15pm, October 11, 1995
CLOSED BOOK
(one page of notes allowed)
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 seven pages.
Name ________________________________________________
Student ID ________________________________________________
Problem Score Max Score
1 _____ 25
2 _____ 20
3 _____ 7
4 _____ 15
5 _____ 18
6 _____ 15
Total _____ 100
(over)
pf3
pf4
pf5

Partial preview of the text

Download Iterative Deepening - Artificial Intelligence - Exam and more Exams Artificial Intelligence in PDF only on Docsity!

CS 540-1: Introduction to Artificial Intelligence

Exam 1: 7:15-9:15pm, October 11, 1995

CLOSED BOOK

(one page of notes allowed)

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 usethe backs of these sheets for scratch work.

Write your name on this and all other pages of this exam. Make sure your exam contains sixproblems on seven pages.

Name ________________________________________________ Student ID ________________________________________________

Problem Score Max Score 1 _____ 25 2 _____ 20 3 _____ 7 4 _____ 15 5 _____ 18 6 _____ 15 Total _____ 100

PROBLEM 1 - Basic Search Strategies (25 points)

Consider the state-space graph drawn below; the start and goal states are labeled. Note that arcs are directed. (if any) and list, in order, the states expanded. (A state is For each of the search strategies listed below, indicate which goal state is reached expanded when it is removed from the OPEN list.) Assume that all search strategies use an OPEN and a CLOSED list, and that best-first search checks for shorter paths to nodes. When all else is equal, nodes should be expanded in alphabetical order.

Start A

B C

D E Goal

Goal

KEY cost oftraversing this arc is X estimated costto nearest goal is Y

0

0 Y

X

F

0

2

25

10

3^60 75

5 (^3540)

30 45

35

(^1515)

5

(^1) 10^35

10

Breadth-First Search Goal state reached: _____ States expanded: ____________________________________

Iterative Deepening

Goal state reached: _____ States expanded: ____________________________________

Uniform-Cost Search (implemented as best-first search with f=g )

Goal state reached: _____ States expanded: ____________________________________

Best-First Search (using f=g+h )

Goal state reached: _____ States expanded: ____________________________________

Hill Climbing Goal state reached: _____ (using the h function only) States expanded: ____________________________________

Part B. (continued) Propose and justify a combination of function, is guaranteed to lead to the expansion of no more nodes than the smallest h1, h2, and h3 that, when used by A* as its h number expanded by A* if it individually used each of h1, h2, and h.

PROBLEM 3 - Game Playing (7 points)

Apply theReport the estimated values of the intermediate nodes and indicate the proper move of the minimax algorithm to the game tree below, where it is the minimizer’s turn to play. minimizer.

minimizer maximizer minimizer 5 2 −3^9 4 0 −2^ −

Indicate, by crossing out,this call to the board evaluator is unnecessary. one (1) unnecessary call to the static board evaluator. Explain why

PROBLEM 4 - Propositional Logic (15 points)

Part A. Use a truth table to show the following sentence in propositional logic is valid. [ (P ⇒ Q) ∧ (P ⇒ R) ] ⇔ [ P ⇒ (Q ∧ R) ]

Part B. Let the following propositional symbols have the following meaning: A John was in a car accident. S John is sick. I John is injured. D John needs to see a doctor. Express each of the following English sentences in propositional logic. hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh John was in a car accident, but he isn’t injured.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh John needs to see a doctor if he is sick or injured.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh If John wasn’t in an accident and isn’t sick, then he doesn’t need a doctor.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

PROBLEM 6 - Common Lisp (15 points)

Part A. Consider the following recursive function definition. It is supposed to replace all the numbers, located anywhere in an s-expression, with the atom XXX.buggy. However, it is (defun X-out-numbers (sexpr) "Replace all numbers in this sexpr with the atom XXX." (if (numberp sexpr) ’XXX (list (if (numberp (first sexpr)) XXX (first sexpr)) (X-out-numbers (rest sexpr)) )))

Describe below the errors in this function, and write a correct version of the function to the of the code above (you need not rewrite the first two lines). right

Part B. Assume the following is typed to a newly started LISP: (setf a ’(* 1 3 9)) (setf b ’(+ 3 (first (rest a)))) What does each of the following return (write ‘‘error’’ if an error condition develops): i) b returned value = ii) (first returned value = (rest a)) iii) (cons returned value = ’a a)

(the end)