Вы находитесь на странице: 1из 5

Assignment I (16th August 2016)

Jamia Millia Islamia Department of Computer Science

MCA 51: Artificial Intelligence


Instructor: Dr. Suraiya Jabin
Marks weightage: 5 (towards Theory Internal Assessment)
Note:
1. Collaborations on assignment works are not permitted.
2. Cheating and any other anti-intellectual behavior, including giving your work to someone else or
downloading solution through Internet or copying your answers from your room mate or from back of
the book, will be dealt with severity or may result in evaluation zero.
3. Assignments after the due date would not be accepted and will result in evaluation zero out of five.
Given on: Saturday, August 16th, 2016
Due on: Friday, September 7, 2016 (Before theory class)
Topics: Exhaustive Search, Heuristic Search, Game Tree, First-Order Logic

Text Book: AI A Modern Approach, 3rd Edition by Russel and Norvig


PROLOG text book: Prolog Programming by Ivan Bratko
Reference Book: AI by Rich and Knight, TMH
1.

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?

11. The following facts about a murder story:


The police have 3 suspects of the murder of Mr. Cooper: Smith, Jones and Williams. Smith, Jones and Williams each declare
that they did not kill Cooper. Smith also states that Cooper was a friend of Jones and that Williams disliked him. Jones also
states that he did not know Cooper and that he was out of town the day Cooper was killed. Williams also states that he saw
both Smith and Jones with Cooper the day of the murder and that either Smith or Jones must have killed him. Can you
determine who the murderer was if
One of the 3 men is guilty, the 2 innocent men are telling the truth, but the statements of the guilty man may
or may not be true
Innocent men do not lie.
Use predicate logic to solve this puzzle

12. Consider this starting position of a simple 4-square game:

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

Вам также может понравиться