-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproblems_strips_navigation.py
54 lines (44 loc) · 1.8 KB
/
problems_strips_navigation.py
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
prompt_question="""
Task: Solve this indoor navigation task.
"""
lst_tasks = [
"""
Initial state: At(robot, RoomA), DoorStatus(RoomA, RoomB, closed), DoorStatus(RoomB, RoomC, closed), DoorStatus(RoomC, RoomD, closed)
Goal state: At(robot, RoomB)
""",
"""
Initial state: At(robot, RoomD), DoorStatus(RoomA, RoomB, closed), DoorStatus(RoomB, RoomC, closed), DoorStatus(RoomC, RoomD, closed)
Goal state: At(robot, RoomA)
""",
"""
Initial state: At(robot, RoomB), DoorStatus(RoomA, RoomB, closed), DoorStatus(RoomB, RoomC, closed), DoorStatus(RoomC, RoomD, closed)
Goal state: At(robot, RoomC)
""",
"""
Initial state: At(robot, RoomC), DoorStatus(RoomA, RoomB, closed), DoorStatus(RoomB, RoomC, closed), DoorStatus(RoomC, RoomD, closed)
Goal state: At(robot, RoomD)
""",
"""
Initial state: At(robot, RoomA), DoorStatus(RoomA, RoomB, closed), DoorStatus(RoomB, RoomC, closed), DoorStatus(RoomC, RoomD, closed)
Goal state: At(robot, RoomD)
""",
"""
Initial state: At(robot, RoomD), DoorStatus(RoomA, RoomB, closed), DoorStatus(RoomB, RoomC, closed), DoorStatus(RoomC, RoomD, closed)
Goal state: At(robot, RoomA)
"""
]
prompt_actions = """
Actions:
// move robot from X to Y
_Move(robot, X, Y)_
Preconditions: At(robot, X), DoorStatus(X, Y, open)
Postconditions: not At(robot, X), At(robot, Y)
// open door between X and Y
_OpenDoor(robot, X, Y)_
Preconditions: At(robot, X), DoorStatus(X, Y, closed)
Postconditions: DoorStatus(X, Y, open), not DoorStatus(X, Y, closed)
// close door between X and Y
_CloseDoor(robot, X, Y)_
Preconditions: At(robot, X), DoorStatus(X, Y, open)
Postconditions: DoorStatus(X, Y, closed), not DoorStatus(X, Y, open)
"""