# Monkey and Banana Problem

## Presentation on theme: "Monkey and Banana Problem"— Presentation transcript:

Monkey and Banana Problem
Sohn JongSoo Intelligent Information System Lab. Dept. of Computer Science, Korea University

ceiling Initial State { Hungry(monkey), isOn(Chair, floor), isOn(Desk, floor), isOn(Banana, ceiling), isOn(Monkey, floor) } room Monkey Desk Chair floor

ceiling Goal State { Happy(monkey), isOn(Chair, Desk), isOn(Desk, floor), Eat(Monkey, Banana), isOn(Monkey, Chair) } room Monkey Chair Desk floor

ceiling Working Memory { Hungry(Monkey), isOn(Chair, Floor),
isOn(Desk, Floor), isOn(Banana, cEiling), isOn(Monkey, Floor) } Production Rules If isOn(C, F) & isOn(D, F) Then isOn(C, F) -> isOn(C,D) If isOn(M,F) & isOn(C,F) Then isOn(M,F) -> isOn(M,C) If isOn(M,F) & isOn(D,F) Then isOn(M,F) -> isOn(M,D) If isOn(M,D) & isOn(C,D) Then isOn(M,D) -> isOn(M,C) If isOn(M,C) & isOn(C,D) Then isOn(B,E) -> Eat(M,B) If Eat(M,B) Then Hungry(M) -> Happy(M) room Monkey Desk Chair floor

ceiling Working Memory { Hungry(Monkey), isOn(Chair, Desk),
isOn(Desk, Floor), isOn(Banana, cEiling), isOn(Monkey, Floor) } Production Rules If isOn(C, F) & isOn(D, F) Then isOn(C, F) -> isOn(C,D) If isOn(M,F) & isOn(C,F) Then isOn(M,F) -> isOn(M,C) If isOn(M,F) & isOn(D,F) Then isOn(M,F) -> isOn(M,D) If isOn(M,D) & isOn(C,D) Then isOn(M,D) -> isOn(M,C) If isOn(M,C) & isOn(C,D) Then isOn(B,E) -> Eat(M,B) If Eat(M,B) Then Hungry(M) -> Happy(M) room Chair Monkey Desk floor Iteration 0 : rule1 fired

ceiling Working Memory { Hungry(Monkey), isOn(Chair, Desk),
isOn(Desk, Floor), isOn(Banana, cEiling), isOn(Monkey, Desk) } Production Rules If isOn(C, F) & isOn(D, F) Then isOn(C, F) -> isOn(C,D) If isOn(M,F) & isOn(C,F) Then isOn(M,F) -> isOn(M,C) If isOn(M,F) & isOn(D,F) Then isOn(M,F) -> isOn(M,D) If isOn(M,D) & isOn(C,D) Then isOn(M,D) -> isOn(M,C) If isOn(M,C) & isOn(C,D) Then isOn(B,E) -> Eat(M,B) If Eat(M,B) Then Hungry(M) -> Happy(M) room Chair Monkey Desk floor Iteration 1 : rule3 fired

ceiling Working Memory { room Hungry(Monkey), isOn(Chair, Desk),
isOn(Desk, Floor), isOn(Banana, cEiling), isOn(Monkey, Chair) } Production Rules If isOn(C, F) & isOn(D, F) Then isOn(C, F) -> isOn(C,D) If isOn(M,F) & isOn(C,F) Then isOn(M,F) -> isOn(M,C) If isOn(M,F) & isOn(D,F) Then isOn(M,F) -> isOn(M,D) If isOn(M,D) & isOn(C,D) Then isOn(M,D) -> isOn(M,C) If isOn(M,C) & isOn(C,D) Then isOn(B,E) -> Eat(M,B) If Eat(M,B) Then Hungry(M) -> Happy(M) room Monkey Chair Desk floor Iteration 2 : rule4 fired

ceiling Working Memory { room Hungry(Monkey), isOn(Chair, Desk),
isOn(Desk, Floor), Eat(Monkey, Banana), isOn(Monkey, Chair) } Production Rules If isOn(C, F) & isOn(D, F) Then isOn(C, F) -> isOn(C,D) If isOn(M,F) & isOn(C,F) Then isOn(M,F) -> isOn(M,C) If isOn(M,F) & isOn(D,F) Then isOn(M,F) -> isOn(M,D) If isOn(M,D) & isOn(C,D) Then isOn(M,D) -> isOn(M,C) If isOn(M,C) & isOn(C,D) Then isOn(B,E) -> Eat(M,B) If Eat(M,B) Then Hungry(M) -> Happy(M) room Monkey Chair Desk floor Iteration 3 : rule5 fired

ceiling Working Memory { room Happy(Monkey), isOn(Chair, Desk),
isOn(Desk, Floor), Eat(Monkey, Banana), isOn(Monkey, Chair) } Production Rules If isOn(C, F) & isOn(D, F) Then isOn(C, F) -> isOn(C,D) If isOn(M,F) & isOn(C,F) Then isOn(M,F) -> isOn(M,C) If isOn(M,F) & isOn(D,F) Then isOn(M,F) -> isOn(M,D) If isOn(M,D) & isOn(C,D) Then isOn(M,D) -> isOn(M,C) If isOn(M,C) & isOn(C,D) Then isOn(B,E) -> Eat(M,B) If Eat(M,B) Then Hungry(M) -> Happy(M) room Monkey Chair Desk floor Iteration 4 : rule6 fired

ceiling Working Memory { room Happy(Monkey), isOn(Chair, Desk),
isOn(Desk, Floor), Eat(Monkey, Banana), isOn(Monkey, Chair) } Production Rules If isOn(C, F) & isOn(D, F) Then isOn(C, F) -> isOn(C,D) If isOn(M,F) & isOn(C,F) Then isOn(M,F) -> isOn(M,C) If isOn(M,F) & isOn(D,F) Then isOn(M,F) -> isOn(M,D) If isOn(M,D) & isOn(C,D) Then isOn(M,D) -> isOn(M,C) If isOn(M,C) & isOn(C,D) Then isOn(B,E) -> Eat(M,B) If Eat(M,B) Then Hungry(M) -> Happy(M) room Monkey Goal State { Happy(monkey), isOn(Chair, Desk), isOn(Desk, floor), Eat(Monkey, Banana), isOn(Monkey, Chair) } Chair Desk floor Goal state !!