# Practice Midterm

Intro to AI Show (Su 99)
Selmer Bringsjord

Question 1. Russell and Norvig move from the situation calculus to the event calculus because the former has trouble representing

a
discrete actions
b
single agents
c
multiple agents
d
the wumpus world
e
none of the above

Question 2. Suppose that and a = b are in KB13. In standard first-order logic

a
True
b
False

Question 3. Define the Lisp function combine-expr to take an arithmetic operator, an operand, and a list representing an arrithmetic expression and return the expression with the operator and operand applied to the first member of the expression. E.g., (combine-expr '+ 3 '(5 - 6 * 8)) should evaluate to ((3 + 5) - 8 * 8).

Question 4. Which of the following relations are referentially opaque?

a
Believes
b
Fears
c
Knows
d
none of the above
e
all of the above

Question 5. On Russell & Norvig's approach to mental objects, how would the following sentence be represented?

• ALVIN believes that the driver (driver1) believes that the driver of the oncoming car (driver2) sees driver1.

Question 6. Let be the substitution {x/Tina, y/Charlie}. And suppose that

is in KB12. What rule of inference can be used to establish

a
b
paramodulation
c
existential introduction
d
universal elimination
e
none of the above

Question 7. Suppose that the following function has been defined in Lisp:

(defun creative-ais-inp (roster)
(cond ((null roster) nil)
((eql 'brutus (first roster)) t)
(t (creative-ais-inp (rest roster)))))


Now suppose that you type

(setf iai-agents '(ralph jr9000 tom anita henry brutus
selmer chungkim))


to Lisp. At this point, typing

(creative-ais-inp iai-agents)}


will return

a
T
b
NIL
c
an error message
d
a stack overflow warning
e
none of the above

Question 8. Suppose that KB5 includes the information in the blocks world grid for Selmer's World (shown on our web site). (So the knowledge base in question contains all formulas that can be observed from this grid in Hyperproof.) Suppose that the following formula is added to this knowledge base.

Then KB .

a
true
b
false

Question 9. Which of the following first-order formulas could represent Alma's mother loves all maternal grandparents," where L(x,y)' stands for x loves y."

a
b
c
d
e
none of the above

Question 10. Write a Lisp function to compute this function:

Question 11. Write a Lisp function to investigate G's Conjecture (see immediately below) by checking all natural numbers from 2 to 2000. After studying the output of this function, give your own conjecture (Yes" or No") as to the truth of G's Conjecture.

G's Conjecture
The sum of all prime numbers greater than one is an even number.

Question 12. Consider the following sentence in the propositional calculus. Complete the table that follows it, by writing down a Yes' or a No.'

 Concept Verdict (Yes or No) satisfiable valid well-formed

Question 13. Consider the following first-order sentence. Complete the table that follows it, by writing down a Yes' or a No.'

 Concept Verdict (Yes or No) satisfiable valid well-formed

Question 14. Given the following information, could an agent with the reasoning power of the propositional calculus prove that the unicorn is mythical? How about magical? Horned?

If the unicorn is mythical, then it is immortal, but if it is not mythical, then it is a mortal mammal. If the unicorn is either immortal or a mammal, then it is horned. The unicorn is magical if it is horned.

a
Yes, No, Yes
b
Yes, Yes, Yes
c
No, No, No
d
No, Yes, Yes
e
none of the above

Question 15. Suppose that KB78 for an agent trying to thrive in the wumpus world contains the following 10 facts:

K1
K2
K3
S1,2
K4
K5
B2,1
K6
K7
K8
K9
K10

Consider the following part of a proof, carried out by an agent with KB78.

 n-1 k And-Elim n K10, K3 by MP n+1 n, n-1 by ?

Which rule of inference is used here?

a
And-Elimination
b
Or-Elimination
c
Modus Ponens
d
Unit Resolution
e
none of the above

Questions 16-18. Consider the following proof produced by OTTER.

---------------- PROOF ----------------
7 [] -Square(anine).
22 [] Vickynum(x)| -Triangle(x)|Square(x)| -Greater(x,aseven)| -Less(x,aten).
23 [] -Vickynum(anine).
24 [] Triangle(anine).
38 [] Less(anine,aten).
42 [] Greater(anine,aseven).
44 [hyper,42,22,24,38,unit_del,23,7] $F. ------------ end of proof -------------  16. What does the appearance of$F indicate?

a
that the empty clause has been reached
b
that a contradiction has been found
c
a and b
d
none of the above

17. What puzzle does this proof pertain to?

a
Secrets
b
The Wise Man Puzzle
c
d
none of the above

18. Suppose that this proof is produced by a knowledge-based agent in its attempt to compute an ASK call. Would it be important, in this context, for the conjuction of lines 7, 22, 24, 28, and 42 to be satisfiable?

a
Yes
b
No

Question 19. Suppose for the sake of argument that Ralph computes so quickly that he can use minimax search to play perfect Go. A proponent of AI would probably not be all that impressed with Ralph's performance.

a
Strong
b
Weak

Question 20. That first-order logic is complete amounts to which of the following statements (where KB' denotes some arbitrary knowledge-based and denotes some arbitrary first-order formula)?

a
If KB then KB
b
If KB then KB
c
If KB and KB then KB
d
If KB and KB then KB
e
none of the above

Question 21. What is the most general unifier for the following pair of sentences.

• Knows(Father(y),y)
• Knows(x,x)

a
{y/John, x/John}
b
{y/x}
c
{y/John, x/y}
d
{y/x, x/y}
e
none of the above

Question 22. Here is a formula in first-orderlogic:

This formula corresponds to what English sentence, given that  " means x loves y"?

a
Someone loves everyone.
b
Everyone loves someone.
c
No one loves everyone.
d
There is someone everyone loves.
e
none of the above

Questions 23-25. (The following two questions are related to problem 3.16 in the book.) The artificial agent SEEK operates as follows. It perceives a sequence of postive integers, generated by some sequence function f(n), and then predicts the next number in the sequence. For example, the sequence {1, 2, 4, 8, } -- given to SEEK, we assume, at random -- might result in the prediction 16, based on the view that f(n) = 2n in this case. Let's suppose that the space of possible functions consists of all expressions built from the elements 1 and n, and the functions and exponentiation. Suppose that the program for SEEK has been written in Common Lisp, so that

> (seek '(1 2 4 8))
16
(exp (+ 1 1) n)

23. In PAGE description of SEEK, the G would be

a
predicting
b
searching the space
c
sequencing
d
finding the underlying function
e
none of the above

24. Suppose that an agent IQ, incorporating both SEEK and the program ANALOGY discussed in the R&N text, has the ability to score 200 on any and all IQ-tests given it. Take a stand as to whether IQ's arrival would mean that AI had truly succeeded. Defend your position in two paragraphs, relating what you say to the reading.

25. How long would it take Ralph to produce the Common Lisp code that brings SEEK to life?

a
less time than any human
b
a fraction of a nanosecond
c
a fraction of the time it would take Selmer
d
a fraction of the time it would take `Junior"
e
all of the above