Docsity

Minimax Algorithm - Introduction to Artificial Intelligence - Exams, Exams of Artificial Intelligence

Toggle sidebar
bg1
CS 188, Spring 1997
Midterm
Professor Hansson
Problem #1 (10 points)
You've been assigned to proofread a new AI textbook by Prof. Victor Bogon from the University of Kansas
at Oceanview. Indicate whether Prof. Bogon's statements below are true or false:
1. "Alpha-beta pruning is a way to speed up the Minimax algorithm, but in some cases, may cause you to
choose a worse action/operator."
2. "Minimax requires an admissible heuristic."
3. "With an admissible and consistent heuristic, A* finds the shortest-path solution to a goal state."
4. "If a sentence is satisfiable, it is also valid."
5. "The sentence P->Q is valid."
6. "The sentence P->Q is satisfiable."
Problem #2 (10 points)
Prof. Bogon's memory is very bad. Answer the following questions for him. One or two sentences should be
enough for each answer.
1. What does a "table-driven agent" do, and what are its inputs and outputs?
2. What does it mean to "expand a state" in a search algorithm?
3. What is a "sound" inference procedure? What is a "complete" inference procedure?
4. What is "conjunctive normal form"?
Problem #3 (5 points)
In the following state-space graph, Prof. Bogon has labeled the nodes with heuristic function values. The start
and goal state(s) are labeled S and G. You are to check whether the heuristic function is admissible or not. If
it is not admissible, indicate the smallest set of heuristic-values which would have to be changed to make it
admissible.
All operator-costs are equal to 1. Note that the operators are directed, as indicated by the arrows.
CS 188, Midterm, Spring 1997
CS 188, Spring 1997 Midterm Professor Hansson 1
pf3
pf4
pf5
pf8

Partial preview of the text

Download Minimax Algorithm - Introduction to Artificial Intelligence - Exams and more Exams Artificial Intelligence in PDF only on Docsity!

CS 188, Spring 1997

Midterm

Professor Hansson

Problem #1 (10 points)

You've been assigned to proofread a new AI textbook by Prof. Victor Bogon from the University of Kansas at Oceanview. Indicate whether Prof. Bogon's statements below are true or false:

  1. "Alpha-beta pruning is a way to speed up the Minimax algorithm, but in some cases, may cause you to choose a worse action/operator."
  2. "Minimax requires an admissible heuristic."
  3. "With an admissible and consistent heuristic, A* finds the shortest-path solution to a goal state."
  4. "If a sentence is satisfiable, it is also valid."
  5. "The sentence P->Q is valid."
  6. "The sentence P->Q is satisfiable."

Problem #2 (10 points)

Prof. Bogon's memory is very bad. Answer the following questions for him. One or two sentences should be enough for each answer.

  1. What does a "table-driven agent" do, and what are its inputs and outputs?
  2. What does it mean to "expand a state" in a search algorithm?
  3. What is a "sound" inference procedure? What is a "complete" inference procedure?
  4. What is "conjunctive normal form"?

Problem #3 (5 points)

In the following state-space graph, Prof. Bogon has labeled the nodes with heuristic function values. The start and goal state(s) are labeled S and G. You are to check whether the heuristic function is admissible or not. If it is not admissible, indicate the smallest set of heuristic-values which would have to be changed to make it admissible.

All operator-costs are equal to 1. Note that the operators are directed, as indicated by the arrows.

CS 188, Spring 1997 Midterm Professor Hansson 1

Admissible? Circle either YES or NO

If the heuristic is not admissible, which heuristic values would you change to make it admissible: _____

Problem #4 (5 points)

Represent the following statements in FOL (first-order logic).

  1. "All Germans speak the same languages." [Use Speaks(x,l) to mean that person x speaks language l.]
  2. "Only one unicorn exists."
  3. "More than one unicorn exists."
  4. "There exist exactly two unicorns."

Problem #5 (15 points)

In this problem, you will apply different search algorithms to the same search tree. The start state is denoted by S and the goal state by G. You are to number the nodes in the tree according to the order in which they will be "expanded" during the search. Do not number a node if it is not expanded in the search. Write the numbers next to or inside each expanded node.

You should make the standard assumptions: that the children of a node are generated in left-to-right order, and that when an algorithm needs to "break ties" among nodes with equal priority, the algorithm will first expand the earliest generated node (i.e., the algorithms obey a "first-in, first-out" policy for tie-breaking).

Write your answers (i.e., number the nodes) directly on the trees provided below.

Breadth-First Search

A* , where the heuristic function value for each node is as specified on the tree. Assume that all operator-costs are equal to 1. Also write down the f-value for each node in the tree.

Finally, count how many state expansions the IDA* algorithm will do on the tree shown above. If IDA*

expands a single state N times, count that as N expansions. Explain your reasoning by filling in the blanks below, showing the number of expansions in each iteration of the algorithm.

Total number of IDA* expansions:_____ IDA* expansions for f-value=: _____ IDA* expansions for f-value=: _____ IDA* expansions for f-value=: _____ IDA* expansions for f-value=: _____ IDA* expansions for f-value=: _____ IDA* expansions for f-value=: _____

Problem #6 (10 points)

Consider the following logic sentences:

1. P -> R

2. Q -> R

  1. P v Q

A. Convert these to clause form. Can you prove that R is true using resolution? If so, do so. If not, explain in English why it can't be done.

B. Can you prove that R is true using forward-chaining inference (modusponens)? If so, do so. If not, explain in English why it can't be done.

C. Can you prove that R is true using backward-chaining inference? If so, do so. If not, explain in English why it can't be done.

Problem #7 (10 points)

Prof. Bogon invented two inference rules over the weekend. For each rule, determine whether it is sound: circle "Yes" or "No" to indicate your answer. Prove your answer for each rule (use any proof technique that works).

Recall that the structure of an inference rule is: premises


conclusion

P -> (Q ^ not Q) Modus Bogus Sound? YES or NO

not P

(P v Q) -> R Modus Hocus Sound? YES or NO not R


Suppose that before applying Minimax, we are told the maximum heuristic value and minimum heuristic value in the tree. Can this information increase the pruning in any of the three trees in this problem? If so, in which tree(s) can we prune more by exploiting this information?

Problem #9 (5 points)

Prof. Bogon claims that his great-great-great-...-grandfather was Magnus the Barefoot (1024-1047), a Norwegian king.

Assuming you had all of the relevant data, which would be the most efficient way to verify Bogon's claim of royal heritage? By showing that (A) Bogon is one of the descendants of Magnus, or (B) by showing that Bagnus is an ancestor of Bogon? Or (C) are the two ways equally efficient?

Select (A) or (B) or (C):___________

Explain the reasoning behind your answer.

Problem #10 (15 points)

Consider the following statements:

  1. John eats all kinds of food
  2. Apples are food
  3. Anything anyone eats which leaves them still alive is food
  4. Bill eats peanuts and is still alive
  5. Sue eats everything that Bill eats
  6. John eats peanuts

Translate each of the above statements into one or more FOL sentences

Convert the FOL sentences to clause form. (recall that the steps in converting to clause form are: Eliminate implications, Move negations inwards, Standardize variables, Move quantifiers left, Skolemize, Distribute And over Or, Flatten nested conjunctions and disjunctions.)

Give a resolution proof of statement 6 using statements 1 through 5. Clearly indicate any variable substitutions that you use during the resolution.

Problem #11 (5 points)

Consider a problem of game-tree search in a space where the same game state (e.g., some board position in chess) can be reached by many different paths in the game tree. Thus, different nodes in the game tree may represent the same game state. Suppose we use alpha-beta pruning to search such a game tree, and have decided that a particular node n and its children can be pruned.

Later, we encounter the same game-state in a node n' in another part of the tree. The subtrees below n and n' will be identical, and the two nodes will have the same heuristic value.

Prof. Bogon claims that we cannot automatically prune n' from our search tree, even though n was pruned earlier. Either prove that we can prune n' (using a brief argument in English) or construct an example (an abstract example is OK) that shows that we cannot.

Prof. Bogon further claims that, not only can we not automatically prune n' , but it can be the case that n' is the node which determines the Minimax value of the root. (In other words, h(n') is the value which is "backed up" the tree to become the Minimax value for the root.) Is Prof. Bogon correct? If so, give an example.

You can use this tree to think about the problem and illustrate your answers.

Posted by HKN (Electrical Engineering and Computer Science Honor Society)

University of California at Berkeley

If you have any questions about these online exams

please contact [email protected].