Professional Documents
Culture Documents
PAL MID 21 22 Model Answer
PAL MID 21 22 Model Answer
Explanation :
Full Marks: 2
Represent as list of five integer values that represent position of queen no. 1-5
respectively in particular column of chess board.
For example :
[5 2 4 3 5] or
[4 3 5 1 4] or
[2 1 3 2 4] or
[5 2 3 4 1] or [2 Marks]
[4 3 5 1 4]
[5 2 4 3 5]
[4 3 4 3 5]
[5 2 5 1 4] [2 Marks]
Full Marks:4
b. Write a PROLOG query corresponding to the question, “What does Puss like to
eat?” and show how it will be answered by your program.
Answer:
likes_to_eat (Puss, X0) ( Negation of query, i.e. proof by contradiction)
cat(Puss), fish(X0)
calico(Puss), fish(X0)
(Clause 6)
fish(X0)
X2/ X0 (Clause 3)
Tuna(X0)
Full Marks:6
Oak 4, Pine 4
Density:
Heavy-6 (Oak-3, Pine-3), Linght-2 (Oak-1, Pine-1)
[ 1 Marks ]
Grain:
Small-4 (Oak-2, Pine-2), Large-4 (Oak-2, Pine-2)
Entropy(Small)=1, Entropy(Large)=1
[ 1 Marks ]
Hardness:
Hard-4 (Oak-3, Pine-1), Soft-4 (Oak-1, Pine-3)
Entropy(Hard)=0.8113, Entropy(Soft)=0.8113
[ 1 Marks ]
Note : 1 Marks awarded for correct root node attribute without any computation
c. Classify these new examples as Oak or Pine using your decision tree above.
i) [Density=Light, Grain=Small, Hardness=Hard] Ans: Pine [1 Marks]
ii)[Density=Light, Grain=Small, Hardness=Soft] Ans: Oak [1 Marks]
4. Consider the following initial and goal states of a Block-World problem in FOL. 10
Show how the STRIPS method would solve this problem. Give the actual plan and
content of goal stack also.
Start: ON(A,B) ʌ ON(C,D) ʌ ONTABLE(B) ʌ CLEAR(C) ʌ ONTABLE(D) ʌ
CLEAR(A) ʌ ARMEMPTY
Answer:
CLEAR(B)
HOLDING(C)
HOLDING(C) ˄ CLEAR(B)
STACK(C,B)
ON(D,A)
Goal
ARMEMPTY
CLEAR(A)
ON(A,B)
ON(A,B) ˄ ARMEMPTY˄ CLEAR(A)
UNSTACK(A,B)
HOLDING(C)
HOLDING(C) ˄ CLEAR(B)
STACK(C,B)
ON(D,A)
Goal
HOLDING(C)
HOLDING(C) ˄ CLEAR(B)
STACK(C,B)
ON(D,A)
Goal
HOLDING(A)
PUTDOWN(A)
ON(C,D) ˄ ARMEMPTY ˄ CLEAR(C)
UNSTACK(C,D)
HOLDING(C) ˄ CLEAR(B)
STACK(C,B)
ON(D,A)
Goal
HOLDING(C) ˄ CLEAR(B)
STACK(C,B)
ON(D,A)
Goal
Third Operator : UNSTACK(C,D) [ 1.5 Marks]
Current State Changes with help of PDA list
ON(D,A)
Goal
CLEAR(A)
HOLDING(D)
HOLDING(D) ˄ CLEAR(A)
STACK(D,A)
Goal
ONTABLE(D) ˄ CLEAR(D)
PICKUP(D)
HOLDING(D) ˄ CLEAR(A)
STACK(D,A)
Goal
HOLDING(D) ˄ CLEAR(A)
STACK(D,A)
Goal
HOLDING(D) ˄ CLEAR(A)
STACK(D,A)
Goal
Plan:
1. UNSTACK(A,B)
2. PUTDOWN(A)
3. UNSTACK(C,D)
4. STACK(C,B)
5. PICKUP(D)
6. STACK(D,A) [ 1 Marks]
Full Marks : 10