6.034 Quiz 1 October 13, 2005: Name Email
6.034 Quiz 1 October 13, 2005: Name Email
034 Quiz 1
Name
1 35
2 35
3 30
Total 100
1
Question 1: Rule-based reasoning (35 points)
Mike Carthy decides to use his 6.034 knowledge to take over MIT. To this end, he wants
to identify individuals as being communists. He would like to identify less powerful
people first, to build a reputation for himself.
(IF
THEN (evaluate-gradstudents)))
(P1
(IF (evaluate-gradstudents)
(?person is gradstudent)
(?topic nationally-valuable)
(P2
(IF (evaluate-gradstudents)
DELETE (evaluate-gradstudents)
ADD (evaluate-professors)))
(P3
(IF (?x is professor)
(?y communist)
You are to simulate backward chaining with the hypothesis (Winston Communist). To
do this, you are to fill in the following table with the patterns that the system tries to
match against the database, in the order that the system tries to match them against the
database. To get started, we have put (Winston Communist) in the table.
2
When writing patterns in the table, write the bindings which are being checked, instead of
the variables (i.e. not ?x). You have enough or more than enough room in the table.
Essential Assumptions:
1. Whenever the system’s user is asked if an assertion is true, (that is, when the assertion
is not found in the assertion database and the assertion does not match any consequent
in a rule), the user answers no.
2. The backward chainer does not add any assertions to the database, so it can derive the
same result multiple times.
3. Conflict resolution is by rule order.
4. If a variable in a rule can be bound to multiple bindings (for example, binding ?topic
to finances or ethics), order the bindings according to the order in which the
corresponding value appears first in the assertion base.
It may be useful to draw an and-or tree, and we have provided room on a tear-off sheet at
the end of the quiz, but we will only grade work shown in the table.
3
Part A.2 (5 points)
Does the backward chainer identify Winston as a communist? Circle your answer:
Yes No
1. A rule set that doesn't halt in 100 steps of forward chaining get a 0.
2. Otherwise, +1 for every communist identified.
What will Mike need to evolve a rule set which is more fit than the current rule set (gets a
higher value from the scoring polynomial, when run on the current assertions)? Circle
your answer and explain.
a) mutations
b) crossovers
c) either
d) both
4
Question 2: Search (35 points)
A slider puzzle contains several small, square pieces that fit together into a rectangle with
a hole in it. For example:
A move consists of sliding a piece into the empty square. Thus, two moves are possible
from the example:
You can solve a slider puzzle by doing a search on it, where every step of the search is
sliding one piece to a new place.
If a search uses a heuristic estimate of the distance to the goal, take that heuristic distance
metric to be the number of pieces that are in a place that should be blank or occupied by a
piece of the other type. For example, if the goal is:
then the heuristic value associated with the following configuration is 2 because a 0 is
where a 1 should be and the 1 is where a blank should be.
The actual distance between two states is the number of moves taken to get from the first
state to the second.
Break ties according to the position of the blank space when you scan left to right in the
top row, then the bottom row as in the following examples:
5
If two different states remain tied, break that tie using the 1 piece.
If you were doing a depth-first search, would you need to allow backtracking to ensure
that you find a solution for the initial state and goal shown in part A? Circle your answer:
Yes No
Yes No
Part E: A* (7 points)
8
Question 3: Games (30 points)
The value near a node is the value that would be returned by the static evaluation
function if applied to that node.
Which is the best choice for the maximizer at node/state A? Circle your answer:
Move to B Move to C
9
Part A.2 (6 points)
Suppose you do not know the best choice of the maximizer at A or its minimax value yet.
You are considering using one of the following two methods to compute the best move
for the maximizer at A.
Method A: Alpha-Beta without progressive deeping on the whole tree (i.e., down to
depth 5) with a left-to-right order of evaluation for the children of each node.
When running Alpha-Beta down to depth 2, you use a left-to-right order of evaluation for
the children of each node and depth 2 static values that have been added to the game tree,
as shown on the next page.
Then, when running Alpha-Beta down to depth 5, you reorder the nodes at depth 1 and
depth 2 using the values of the nodes determined while running Alpha-Beta down to
depth 2. You reorder so as to try to increase the effectiveness of the full Alpha-Beta
search.
Once you reorder the nodes at depth 1 and depth 2, you no longer use the static values at
D, F, and G; instead you use only the static values provided at the leaf nodes. For nodes
at depth 3 and greater, use the node order as shown in the figure.
10
Part B1A (1 point)
Show how you would reorder the nodes at level 1 and level two by drawing the
rearranged tree down to level 2 (that is, include only nodes A, B, C, D, E, F, and G).
Which method requires the smallest total number of static evaluations? To facilitate your
work, we have provided extra copies of the game tree at the end of the examination on a
tear-off sheet.
11
Part B2 (6 points)
Using the method you chose for your previous answer, your method will traverse the tree,
extending some nodes and performing static evaluation at others. List the nodes that are
extended or statically evaluated in the order that your method does the extension and
static evaluation, starting with A.
Note: list a node more than once if it is extended more than once while performing the
search. For instance, if you chose Progressive deepening with Alpha-Beta, node A must
appear twice in the list.
Part B3 (6 points)
How many static evaluations are needed in total using your preferred method?
12
13
14
Scratch paper for drawing trees, etc.
15