concepts.dm.pdsketch.planners.discrete_search.prepare_search#
- prepare_search(func_name, executor, state, goal_expr, *, actions=None, continuous_values=None, action_filter=None, use_only_macro_operators=False, allow_macro_operators=False, forward_state_variables=True, forward_derived=True, verbose=False)[source]#
Prepare for discrete space search.
- Parameters:
func_name – 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.
continuous_values (Dict[str, List[TensorValue]] | None) – the continuous values for action parameters. If None, all action parameters should be discrete.
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.
use_only_macro_operators (bool) – whether to use only macro operators.
allow_macro_operators (bool) – whether to allow macro operators.
forward_state_variables (bool) – whether to forward state variables.
forward_derived (bool) – whether to forward derived variables.
verbose – whether to print verbose information.
- Returns:
the initial state, the goal expression, and the list of possible actions.
- Return type: