Está en la página 1de 6

COS3751/202/2/2013

Tutorial Letter 202/2/2013

Techniques of Artificial Intelligence


COS3751

Semester 2

School of Computing

This tutorial letter contains model


solutions for assignment 02

BAR CODE

Learn without limits.


CONTENTS

Page

1 Assignment 02 model Solutions .........................................................................................3

2
COS3751/202

1 Assignment 02 model Solutions

ASSIGNMENT 02
Solution
Total Marks: 70
UNIQUE ASSIGNMENT NUMBER: 245426
Study material: Chapters 5 and 6. You may skip sections 5.5, 5.6, and 5.7.

Question 1: 32 Marks

(1.1) Is the ideal strategy only available if we have perfect information? Explain your answer. (4)
NoX. Agents can still get the ideal strategy when playing without all the information
X. This means the ideal strategy includes the notion of limited informationX, however,
an agent that has perfect information will most likely outperform and agent that has
limited/imperfect information for the same problemX.

(1.2) What effect does the number of ply s have on the usefulness of the utility function? (3)
Explain your answer fully.
The more plies there are in generalX, the more accurate the utility function may beX2 .

(1.3) Does the order in which nodes are examined in alpha-beta pruning matter? Explain (2)
your answer.
YesX. Since, in general, a low value for MIN at a leaf node will result in subsequent
nodes with higher utility values being prunedX.

(1.4) Consider figure 1 and answer the questions that follow. (The utility value of the leaf
nodes are provided in brackets in the leaf node.)

B C

D E F G H I

J K L M N O P Q R
(7) (5) (6) (7) (1) (8) (8) (9) (4)

Figure 1: Minimax, alpha/beta

3
(a) Provide the minimax values for all the nodes. (9)
A = 9X, B = 5X, C = 1X, D = 7X, E = 5X, F = 7X, G = 8X, H = 8X, I = 9X
(b) Which move should MAX make? Explain your answer. (2)
MAX should make move CX. C has a higher minimax than BX.
(c) Write down the minimax values for all the nodes if alpha/beta pruning is applied to (8)
the tree.
A = (5, ∞)X2 , B = (−∞, 5)X, C = (5, ∞)X, D = (7, infty )X, E = (5, 7)X, F =
(−∞, 5)X, G = (5, ∞)X

(d) Write down which nodes were cut (if any), and if so, what type of cut was made (4)
(alpha, or beta).
M (β-cut)X, O (β-cut)X, H (α-cut)X, I (α-cut)X

Question 2: 8 Marks

Answer the following questions on Constraint Satisfaction Problems (CSPs).

(2.1) Explain what backtracking for a CSP is. (2)


When an inconsistency is foundX, we trace back to the last legal variable assign-
mentsX.

(2.2) Why is arc consisteny such an important part of solving CSPs? (2)
Arc consistency allows us to determine the legal valuesXfor variablesX.

(2.3) Define the Most Remaining Values (MRV) heuristic. (2)


The minimum-remaining-valuesX heuristic chooses the variables with the least num-
ber of legal remaining values hoping to cause a failure (or find a solution soon)X.

(2.4) If no legal assignments for a variable remain during a solution to a CSP, does it mean (2)
that the problem is not solvable? Explain your answer.
NoX, using backtracking one may be able to trace back to a state from which a solution
can be foundX.

Question 3: 19 Marks

Consider the following cryptarithmetic puzzle:


GOLLUM + SMEAGOL = SARUMAN
Each letter represents a specific digit and each digit can only be represented by a specific letter.

(3.1) Re-write the puzzle in terms of a Constraint Satisfaction Problem (CSP) by (15)

1. Defining the variables and their domains, and

2. Defining the constraints on the variables.

4
COS3751/202

1. Variables: X = {G, O, L, U, M, S, E, A, R, N}X5

1. alldiff(G,O,L,U,M,S,E,A,R,N)X2

2. M + L = C1 × 10 + N X

3. C1 + U + O = C2 × 10 + AX

4. C2 + L + G = C3 × 10 + M X

5. C3 + L + A = C4 × 10 + U X

6. C4 + O + E = C5 × 10 + R X

7. C5 + G + M = C6 × 10 + A X

8. C6 + S = AX2

Using aux vars is also acceptable. We only provide the ‘shortcut’ constraints here. A
full enumeration would take too much space. (< M, L, C1 , N >, {(2, 3, 0, 5), (1, 2, 10, 4), ...} >

(3.2) Provide the solution to this cryptarithmetic puzzle. (4)


GOLLUM+SMEAGOL=SARUMAN (127768X+4809127X =4936895X2 )

Question 4: 11 Marks

Consider the problem of assigning aircraft to flights (assume that the airline uses the same model
for all of its flights). Obviously an airline does not own an infinite number of aircraft – so part of the
problem is determining how to do the assignment of aircraft to flights correctly.
Consider the following flight schedule (for a particular 24-hour period):

1. Flight 1: 09:30 - 11:30

2. Flight 2: 08:30 - 09:30

3. Flight 3: 05:00 - 06:00

4. Flight 4: 12:00 - 14:00

5. Flight 5: 11:00 - 13:00

6. Flight 6: 14:30 - 15:00

7. Flight 7: 16:00 - 17:00

8. Flight 8: 12:00 - 12:45

9. Flight 9: 12:46 - 13:15

10. Flight 10: 05:30 - 06:30

11. Flight 11: 15:30 - 17:00

5
12. Flight 12: 19:00 - 20:00

Now answer these questions.

(4.1) Define the variables for this scheduling problem. Explain your choice. (3)
The limited amount of information is by design – actual scheduling would involve the
location of a flight, return times, crew and so on – so we are dealing with a toy problem.
However, the simplest way to think about this is to realise that, we have 12 flights, and
no two airplanes can be assigned to the same flightX2 . It is thus a graph-colouring
problem with the flights as variables: X = {flight1, flight2, flight3, ...}X.

(4.2) Provide the constraint-graph for this problem. (4)

flight1 flight4 flight3 flight6 flight7 flight12

flight2 flight5 flight10 flight11

flight8 flight9
X4
(4.3) Define the domains for the variables. Explain your choice. (2)
The domain for each variable is the aircraft: DX = {A1 , A2 , ... , An } for n number of
aircraft.X2

(4.4) Provide the solution to the problem. (2)


flight1,flight3,flight4,flight6,flight7,flight12 can all make use of the same aircraft (red
colour). flight2, flight5, flight10, and flight11 can make use of the same aircraft (blue
colour). flight8 and flight9 can make use of the same aircraft (green) (any similar
solutionX2 . if some constraints are not met only 1 mark)

También podría gustarte