CM3112 Artificial Intelligence
Planning Language
Steven Schockaert
SchockaertS1@cardiff.ac.uk
School of Computer Science & Informatics Cardiff University
Example: Blocks world
A CB BAC
Initial state Goal state
Example: Blocks world
C BA
Example: Blocks world
C
BA
Action: pick up block C from A
Preconditions:
The robot is not holding anything
There are no blocks on C C is on block A
Effects:
The robot holds C
There are no blocks on A
C is not on A anymore
Example: Blocks world
Action: put down C on table Preconditions:
The robot is holding C
Effects:
The robot is not holding anything
BA
C
Block C is on the table There are no blocks on C
Example: Blocks world
BC
Action: pick up B from table
Preconditions:
The robot is not holding anything
There are no blocks on B B is on the table
A
C
Effects:
The robot is holding B
Example: Blocks world
A
BC C
Action: put down B on C
Preconditions:
The robot is holding B
There are no blocks on C
Effects:
The robot is no longer holding B
B is on block C
STRIPS
To formalise a planning problem, we need
‣ a way to encode states, including an initial state and goal states ‣ a way to encode actions
One of the most common languages for encoding planning problems is STRIPS (“Stanford Research Institute Problem Solver”)
‣ Uses logic to encode states, and the preconditions and effects of actions
States in STRIPS are represented as conjunctions of atoms Closed-world assumption: every atom which is not asserted as
true, is assumed to be false
‣ No need to consider negation to represent states
STRIPS
Atoms are usually encoded using a predicate-argument structure
The atom says something about the objects block1 and block2
On(block1, block2)
The predicate on is used to denote a particular type of relationship
STRIPS
Atoms are usually encoded using a predicate-argument structure
On(block1, block2) Clear(block1)
The predicate clear is used to denote a particular type of property a block can have
STRIPS: states
Initial state:
ontable(B) ontable(A) on(C, A) clear(B) clear(C) empty
the robot is not holding anything
ontable(B) othnetreabislen(oAth)in g on(C,A) ontable(C) on(B, C) on(A, B) clear(A)
on block B
clear(B) clear(C) empty ontable(C) on(B, C) on(A, B) clear(A)
Goal state:
STRIPS: actions
Preconditions are encoded as conjunctions of literals
‣ Atoms encode which conditions need to be satisfied before the action can take place
‣ Negated atoms encode conditions that cannot be true when the action takes place (note: negated preconditions are not allowed in the standard STRIPS language)
Effects are encoded as conjunctions of literals
‣ Atoms encode which conditions become true after executing
the action
‣Negated atoms encode which conditions become false after executing the action
Variables are used to encode actions that can be applied to all objects that satisfy the preconditions, rather than a single object