concepts.pdsketch.planners.discrete_search.apply_action#

apply_action(executor, state, action, forward_derived=True)[source]#

Apply an action to a state. If success, the function also forwards the axioms and optionally derived predicates.

Parameters:
  • executor (PDSketchExecutor) – the executor.

  • state (State) – the state to be applied.

  • action (OperatorApplier) – the action to be applied.

  • forward_derived – whether to forward the derived predicates.

Returns:

a tuple of (success, new_state).

Return type:

Tuple[bool, State]