Docsity

Artificial Intelligence - Artificial Intelligence - Solved Exam, Exams of Artificial Intelligence

Toggle sidebar
bg1
CS 416, Artificial Intelligence
Midterm Examination
Spring 2003
Name:__________________________
This is a closed book, closed note exam. The standard problem is worth 3 points and
problems 7, 10, 13, 14, 23, and 27 are worth double points.
Introductory Material
1) When did artificial intelligence begin as a pursuit of computer science?
a) 1930s
b) 1950s – A two-month workshop at Dartmouth was organized in the
summer of 1956 to study AI
c) 1970s
d) 1990s
2) What is a satisficing solution?
A solution that is good enough (satisfies certain constraints), but is not optimal.
3) Who was greatly involved with British efforts to build computers and crack codes
during WWII?
Alan Turing
4) We can view an agent as a function that maps one thing to another. What terms could
be used to describe the inputs and the outputs of the agent function, f(x) = y
x = percepts
y = actions
5) If the state at the next instant in time depends *only* on the state at the current time,
the task environment is said to be ________________?
a) episodic
b) stochastic
c) Markovian
d) linear
e) dynamic
Either episodic or Markovian was accepted.
pf3
pf4
pf5
pf8

Partial preview of the text

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

CS 416, Artificial Intelligence

Midterm Examination

Spring 2003

Name:__________________________

This is a closed book, closed note exam. The standard problem is worth 3 points and problems 7, 10, 13, 14, 23, and 27 are worth double points.

Introductory Material

  1. When did artificial intelligence begin as a pursuit of computer science?

a) 1930s b) 1950s – A two-month workshop at Dartmouth was organized in the summer of 1956 to study AI c) 1970s d) 1990s

  1. What is a satisficing solution?

A solution that is good enough (satisfies certain constraints), but is not optimal.

  1. Who was greatly involved with British efforts to build computers and crack codes during WWII?

Alan Turing

  1. We can view an agent as a function that maps one thing to another. What terms could be used to describe the inputs and the outputs of the agent function, f(x) = y

x = percepts

y = actions

  1. If the state at the next instant in time depends only on the state at the current time, the task environment is said to be ________________?

a) episodic b) stochastic c) Markovian d) linear e) dynamic Either episodic or Markovian was accepted.

  1. Who won the most recent human vs. computer chess competition? a) the human b) the computer c) it finished in a draw

Uniformed Search

  1. Route planning: A network of roads connects n cities. You must find a path from a given start city to a given goal city along these roads.
  • state : current location (city)
  • goal test : are we at the goal city?
  • operator : traveling from one city to another along a road in the network
  • path cost : total distance traveled

(a) Depth-limited search a. Can this search be used on this problem? ____ yes ___ If not, why not?

b. If so, what is an appropriate depth limit? ___ n-1 ____

c. Is this search complete for this problem? ___ yes ____

d. Is this search optimal for this problem? ____ no ____

(b) Breadth-first search: a. Can this search be used on this problem? ___ yes ____ If not, why not?

b. Is this search complete for this problem? ___ yes ____

c. Is this search optimal for this problem? ___ no _____ BFS would only be optimal if all distances were equal. That is not a valid assumption.

  1. Given the following state tree:

(0) /
(1) (2) / \ /
(3)(4) (5)(6)

i.e., state (0) expands to (1) & (2), state (1) to (3) & (4), and state (2) to (5) & (6). And the BFS and DFS implementation are such that the fringe would look like {(1), (2)} after expanding (0). Note the fringe is an ordered list

  1. What is a consistent heuristic? One such that the heuristic value of a parent node is never greater than the cost of traveling to its children nodes plus the heuristic value of those nodes. I.e., h(n) ≤ c(n,a,n’) + h(n’)

  2. Suppose we want to use the A* algorithm on the graph below to find the shortest path from node S to node G. Each node is labeled by a capital letter and the value of a heuristic function. Each edge is labeled by the cost to traverse that edge.

For this problem:

  • Perform the A* algorithm on this graph, filling in the table below. You should not need all the lines in the table. Indicate the f, g , and h values of each node on the queue as shown in the first two rows of the table. You need not write the contents of the (priority) queue in order in the table.

Assume that if you find a path to a node already on the queue that you update its cost (using the lower f value) instead of adding another copy of that node to the queue.

  • Show the path found by the A* algorithm on the graph above.

iteration node expanded Priority queue at end of this iteration 0 S = 0 + 6 = 6 (i.e. S = g(S) + h(S) = f(S)) 1 S A = 2 + 4 = 6; B = 3 + 4 = 7 2 A B = 7, C = 2 + 3 + 4 = 9 3 B C = 3 + 1 + 4 = 8, D = 3 + 3 + 3.5 = 9. 4 C E = 4 + 3 + 1 = 8, D = 4 + 1 + 3.5 = 8. 5 E D = 8.5, G = 7 + 2 + 0= 9 6 D F = 5 + 2 + 1 = 8, G = 9 7 F G = 7 + 1 + 0 = 8 (^8) G 9 10

  1. Suppose we run the A* algorithm using a heuristic that is admissible but not consistent.

a) Is A* still going to return the shortest path of all successful paths? ___ Yes ___

b) Why? A is guaranteed to be optimal when an admissible heuristic is used in the TREE-SEARCH algorithm.*

c) If it is still going to return the shortest path of all successful paths, then why do we care about consistent heuristics? Consistent heuristics allow A to be optimal using the GRAPH-SEARCH algorithm. They also allow you to draw cost contours in state space.*

  1. Consider the 15-puzzle problem. Is the following heuristic admissible, yes or no: The MisplacedTiles heuristic using only the first 15 tiles (potentially including the blank). Stated another way, the MisplacedTiles heuristic ignores the state of the bottom, right tile. Yes. Ignoring the sixteenth tile makes up for including the blank.

  2. Answer True or False and provide a one-sentence explanation: The “Manhattan Distance” is in fact an admissible heuristic for finding the shortest path through Manhattan. (Hint: Broadway crosses Manhattan on a diagonal.) False. The Manhattan Distance can overestimate the distance if diagonal traveling is allowed.

  3. Why is local beam search not simply parallel hill-climbing search? Local beam search allows communication of best states between threads so that more promising regions of the state space will be explored by more threads. Parallel hill-climbing has the threads working independently of each other.

  4. Assume heuristic A dominates heuristic B. a) Why is it better to use A with A*? Include a definition of what domination means in this context. Assuming both heuristics are admissible, A is a better estimate of the true cost to the goal than B. This can be deduced from knowing that admissible heuristics never overestimate the cost to the goal, and domination means that one heuristic always returns a larger, or equal, value than the other. This results in fewer unnecessary nodes being explored.

(extra credit) If A is admissible, is B admissible as well? Yes.

  1. Perform alpha-beta minimax search on the tree below. The player making the first move wishes to maximize the game outcome.
  • Use the cutoff test α>=β
  • Indicate which leaf nodes are evaluated by circling the value of the leaf node.
  • What is the value of this tree? 8
  • Which is the best move from the root node? Move left

Logical Agents

  1. Convert (L ^ G) => M to a Horn Clause:

L G M

L G M

  1. What is the Modus Ponens rule?

B

A ⇒ B , A

  1. α entails β if and only if the sentence (____ α ∧ ¬ β_______) is unsatisfiable?
  1. A knowledge base (KB) contains the following sentences:

Using the standard inference rules for propositional logic, does this KB entail the following sentences? For each answer, state which sentences and rule(s) you are using, if any.

KB does not entail

KB entails, from Silver , Red , and ( T and T)=T

KB entails, from Silver , and (T or x)=T

Extra Credit:

Some heuristics which are not admissible can still be guaranteed to provide an optimal answer (i.e., to return the lowest cost path) for A*. Give an example of one. Several good answers were given here. The heuristic from problem 13 is one. ManhattanDistance + 1 is another, as is ManhattanDistance * 2.

What does meta reasoning mean? Reasoning about reasoning