concepts.pdsketch.strips.strips_grounded_expression.GSExpression#
- class GSExpression[source]#
Bases:
ABC
The base class for all grounded STRIPS expressions.
Methods
compile
()Compile the expression into a function that takes a state as input and returns a boolean value.
filter_propositions
(propositions[, state])Filter the propositions in this expression.
Iterate over all propositions that are used in this expression.
- __init__()#
- __new__(**kwargs)#
- abstract compile()[source]#
Compile the expression into a function that takes a state as input and returns a boolean value.
- abstract filter_propositions(propositions, state=None)[source]#
Filter the propositions in this expression. Only the propositions in the given set will be kept. Note that this function also takes a state as input, essentially, the state is the initial state of the environment, and the propositions contains all propositions that will be possibly changed by actions. Therefore, for propositions outside the propositions set, their value will stay as the same value as in the initial state. See, for example, the implementation for
GSSimpleBoolExpression.filter_propositions()
for more details.- Parameters:
- Returns:
the filtered expression.
- Return type: