concepts.pdsketch.planners.optimistic_search.prepare_optimistic_search#
- prepare_optimistic_search(func_name, executor, state, goal_expr, *, actions=None, action_filter=None, verbose=False, forward_state_variables=True, forward_derived=True)[source]#
Prepare for optimistic search.
- Parameters:
func_name (str) – the name of the calling function.
executor (PDSketchExecutor) – the executor.
state (State) – the initial state.
goal_expr (str | ValueOutputExpression) – the goal expression.
actions (Sequence[OperatorApplier] | None) – the actions to be considered.
action_filter (Callable[[OperatorApplier], bool]) – the action filter. If None, use all possible actions. It should be a function that takes in an action and returns a boolean.
verbose (bool) – whether to print verbose information.
forward_state_variables – whether to forward state variables.
forward_derived – whether to forward derived variables.
- Returns:
the initial state, the goal expression, and the actions to be considered.
- Return type:
Tuple[State, ValueOutputExpression, Sequence[OperatorApplier]]