concepts.dm.pdsketch.planners.discrete_search.validate_plan#

validate_plan(executor, state, goal_expr, actions, *, forward_state_variables=True, forward_derived=True)[source]#

Validate a plan by executing it on the given state.

Parameters:
  • executor (PDSketchExecutor) – the executor.

  • state (State) – the initial state.

  • goal_expr (str | ValueOutputExpression) – the goal expression.

  • actions (Sequence[OperatorApplier]) – the sequence of actions to execute.

  • forward_state_variables – whether to forward state variables.

  • forward_derived – whether to forward derived predicates.

Returns:

the final state and the goal value (the execution result of the goal expression).

Return type:

Tuple[State, TensorValue]