concepts.pdsketch.strips.strips_grounded_expression.GSSimpleBoolAssignExpression#

class GSSimpleBoolAssignExpression[source]#

Bases: GSVariableAssignmentExpression

A simple assignment expression. Here, a simple assignment expression is represented by the set of add effects and the set of delete effects, both of which are a set of propositions.

Methods

compile()

Compile the assignment expression into a function.

filter_propositions(propositions[, state])

Filter the given propositions from the expression.

iter_propositions()

Iterate over all propositions that are used in this expression.

relax()

Delete relaxation of a simple assignment.

Attributes

add_effects

The set of add effects.

del_effects

The set of delete effects.

__init__(add_effects, del_effects)[source]#

Initialize the simple assignment expression.

Parameters:
  • add_effects (Iterable[str]) – the set of add effects.

  • del_effects (Iterable[str]) – the set of delete effects.

__new__(**kwargs)#
compile()[source]#

Compile the assignment expression into a function. By default, the function will return the state with the add and delete effects applied.

Return type:

Callable[[SState], SState]

filter_propositions(propositions, state=None)[source]#

Filter the given propositions from the expression. For simple assignment expressions, the filtering is done simply by removing irrelevant propositions from the add and delete effects.

Parameters:
Return type:

GSSimpleBoolAssignExpression

iter_propositions()[source]#

Iterate over all propositions that are used in this expression.

Return type:

Iterable[str]

relax()[source]#

Delete relaxation of a simple assignment. Essentially, it removes all delete effects.

Return type:

GSSimpleBoolAssignExpression

add_effects: FrozenSet[str]#

The set of add effects.

del_effects: FrozenSet[str]#

The set of delete effects.