Académique Documents
Professionnel Documents
Culture Documents
Whether the admissibility property of a heuristic implies monotonicity? Give explanation for your answers. Suggest a
heuristic which is admissible but not monotonic.
2.
Give a general proof for: A* using tree search is optimal if h(n) is admissible.
3.
Solve the following problems from Reference book (Rich and Knight): Exercises at back of chapter 3: problem 1, 3, 5, 6,
9.
When would best-first search be worse than simple breadth-first search? Explain with reasons.
4.
5.
6.
7.
8.
Consider the following heuristic of water-jug problem (3, 4): Take the sum of the differences in jug contents in the current
state versus the goals state, then divide it by 2. Is this heuristic admissible? If not, suggest an admissible heuristic. Justify your
answer.
Solve Missionaries and Cannibals problem using A* algorithm. Try atleast two heuristics and compare with baseline case,
i.e., the breadth first search.
Solve this MAZE puzzle: You need to make your way through it from A to U.
A
F L M N O
K
P Q R S T
U V W X Y
Draw the complete state space graph for this problem. The possible operators are up, down, left, right, which are only
valid if there is a dashed line between the grid boxes in the map of the maze. Suggest a heuristic and solve using A*, with
that heuristic, assuming a unit cost for each move.
9. Solve the game by suggesting a good heuristic:
Initial State:
B
B
B
W
W
W
Goal State: States where no B is to the left of any W; Operators:
- A tile may hop over one or two other tiles into the empty position with cost equal to no. of tiles jumped over.
- A tile may move into an adjacent empty location with cost 1.
10. The heuristic path algorithm is a best-first search in which the objective function is f(n)=(2-w) g(n) + w h(n). For what values
of w is this algorithm guaranteed to be optimal? What kind of search does this perform when w=0? When w=1? When w=2?
A
1 2
B
4
Player A moves first. The 2 players take turns moving, each player must move his token to an open adjacent space in either
direction. If the opponent occupies an adjacent space, then a player may jump over opponent to the next open space if any.
The game ends when one player reaches the opposite end of the board. If player A reaches space 4 first, then the value of
game to A is +1; if player B reaches space 1 first, then the value of game to A is -1. This game can be generalized to n squares
for any n>2. Prove that A wins if n is even and loses if n is odd.
13. For solving tic-tac-toe problem, Xn is defined as the no. of rows, columns or diagonals with exactly n Xs and no Os. Similarly
On is the no.of rows, columns or diagonals with exactly n Os and no Xs. The utility function assigns +1 to any position with
X3=1 and -1 to any position with O3=1. All other terminal positions have utility 0. For non-terminal positions, use a linear
evaluation function defined as Eval (s)=3X2(s)+X1(s)-(3O2(s)+O1(s)).
a. Approximately how many possible games of tic-tac-toe are there?
b. Show the whole game tree starting from an empty board down to depth 2, taking symmetry into account.
c. Mark on your tree the evaluations of all the positions at depth 2.
d. Use minimax to mark the best strategy.
e. Circle the nodes at depth 2 that would not be evaluated if alpha-beta pruning were applied, assuming the nodes are
generated in the optimal order for alpha-beta pruning.
PROLOG:
1.6, 2.3, 2.6, 2.7, 3.2, 3.14, 3.15, 5.3