-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathmonkeys.txt
28 lines (23 loc) · 1.09 KB
/
monkeys.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Initial state: BananasAt(B), At(A), Level(low), BoxAt(C)
Goal state: Have(Bananas)
Actions:
// move from X to Y
Move(X, Y)
Preconditions: At(X), Level(low)
Postconditions: !At(X), At(Y)
// climb up on the box
ClimbUp(Location)
Preconditions: At(Location), BoxAt(Location), Level(low)
Postconditions: Level(high), !Level(low)
// climb down from the box
ClimbDown(Location)
Preconditions: At(Location), BoxAt(Location), Level(high)
Postconditions: Level(low), !Level(high)
// move monkey and box from X to Y
MoveBox(X, Y)
Preconditions: At(X), BoxAt(X), Level(low)
Postconditions: BoxAt(Y), !BoxAt(X), At(Y), !At(X)
// take the bananas
TakeBananas(Location)
Preconditions: BananasAt(Location), At(Location), Level(high)
Postconditions: Have(Bananas)