CSE 473
Spring 2004
Solutions for PS3 (non-programming part)
Problem 1 (R&N) 18.7. [4 points]
If one leaves out an example of one class, then the majority of the remaining examples are always of the other class. Thus the majority classifier will always predict the wrong answer.
Problem 2 (R&N 11.4 a, b, & d) [many alternate solutions are possible]
at(monkey, A) & At(bananas, B) & At(box, C) &
height(monkey, low) & height(bananas, high) &
pushable(box) & climbable(box)
action: go(?x, ?y)
precond: at(monkey, ?x) & ?x <> ?y
effect: at(monkey, ?y) & not(at(monkey, ?x)
action: push (?b, ?x, ?y)
precond: at(monkey, ?x) & pushable(?b) & ?x<>?y
effect: at(?b, ?y) & at(monkey, ?y) & not(at(?b, ?x)) & not(at(monkey, ?x))
action: climb-down (?b)
precond: on(monkey, ?b) & height(monkey, high)
effect: not(on(monkey, ?b)) & not(height(monkey, high)) &
height(monkey, low)
action: climb-up(?b)
precond: at(monkey, ?x) & at(?b, ?x) & climbable(?b) & height(monkey, low)
effect: on(monkey, ?b) & height(monkey, high) & not(height(monkey, low))
action: grasp(?o)
precond: height(monkey, ?h) & height(?o, ?h) & at(monkey, ?x) & at(?o, ?x)
effect: have(monkey, ?o) & not(at(?o, ?x)) & not(height(?o, ?h))
action: un-grasp(?o)
precond: height(monkey, ?h) & at(monkey, ?x) & have(monkey, ?o)
effect: not(have(monkey, ?o)) & at(?o, ?x) & height(?o, ?h)
Add to initial state: weight(box, light)
Replace action:
action: push (?b, ?x, ?y)
precond: at(monkey, ?x) & pushable(?b) & ?x<>?y & weight(?b, light)
effect: at(?b, ?y) & at(monkey, ?y) & not(at(?b, ?x)) & not(at(monkey, ?x))
Problem 3
[R&N 11.17a, c]