concepts.dm.pdsketch.regression_utils.gen_grounded_subgoals_with_placeholders#
- gen_grounded_subgoals_with_placeholders(executor, state, goal, constraints, candidate_regression_rules, enable_csp)[source]#
Generated a set of subgoals with placeholders for CSP variables.
- Parameters:
executor (PDSketchExecutor) – the executor.
state (State) – the current state.
goal (ValueOutputExpression) – the goal expression.
constraints (Sequence[ValueOutputExpression]) – the constraints.
candidate_regression_rules (List[ApplicableRegressionRuleItem]) – the candidate regression rules.
enable_csp (bool) – whether to enable the constraint satisfaction problem.
- Returns:
the grounded subgoals (which can be AchieveExpression, FindExpression, OperatorApplier, RegressionRuleApplier, or RegressionCommitFlag)
the constraint satisfaction problem (for tracking placeholder variables).
the length of the prefix that can be reordered.
- Return type:
the grounded subgoals. It is a dictionary mapping from the index of the regression rule to a tuple