concepts.dm.pdsketch.strips.strips_grounded_expression#

This file contains the implementation of grounded STRIPS expressions. Here, the word “grounded” means that the expressions have been instantiated on a specific state. Therefore, the expressions will not contain any variables (e.g., quantification or deictic expressions). This will make the representations significantly simpler. For example, the SQuantificationExpression will be translated into a simple GSSimpleBoolExpression (explicit conjunction or disjunction).

To maximize the execution efficiency of grounded expressions (because they will typically be used in the inner loop of the planner for heuristic evaluation), we use a compilation strategy to convert each grounded expression into a function that can be called directly. Therefore, each grounded expression class will have a compile method that returns a function that takes a state as input and returns a Boolean value.

Note that since we want to support delete-relaxation heuristics, the compiled function will support a feature called “forward difference.” This means, when we compute a Boolean expression on a state, we will also keep track of the branches that makes the expression true. Specifically, we will keep track of all state variable-level propositions that have contributed to the “true” value of the expression. During the backtracking stage of the heuristic computation, we will use this information to mark corresponding state variables. See the documentation of GSBoolExpression.enable_forward_diff_ctx() for more details.

Module attributes

GS_OPTIMISTIC_STATIC_OBJECT

OptimisticObject only occurs when the arguments to an operator is a complex-typed (Tensor or PyObject) value.

Functions

gs_compose_bool_expressions(expressions[, ...])

Compose a list of Boolean expressions into a single expression, by taking the conjunction or disjunction of them.

gs_is_constant_false(classifier)

Check if the given classifier is a constant false expression.

gs_is_constant_true(classifier)

Check if the given classifier is a constant true expression.

gs_is_empty_bool_expression(expression)

Check if the given classifier is an empty Boolean expression.

gs_is_simple_conjunctive_classifier(classifier)

Check if the given classifier is a simple conjunctive classifier.

Classes

GSBoolConstantExpression

A constant Boolean expression.

GSBoolForwardDiffReturn

The return type of the forward difference function of a Boolean expression.

GSBoolOutputExpression

The base class for all Boolean expressions.

GSComplexBoolExpression

A complex Boolean expression.

GSConditionalAssignExpression

A conditional assignment expression.

GSExpression

The base class for all grounded STRIPS expressions.

GSOptimisticStaticObjectType

The underlying type for GS_OPTIMISTIC_STATIC_OBJECT.

GSSASAssignExpression

A SAS assignment expression.

GSSimpleBoolAssignExpression

A simple assignment expression.

GSSimpleBoolExpression

A simple Boolean expression.

GSVariableAssignmentExpression

The base class for assignment expressions.

GStripsDerivedPredicate

Grounded STRIPS version of derived predicates.