concepts.dm.pdsketch.planners.optimistic_search.optimistic_search_strips#
- optimistic_search_strips(executor, state, goal_expr, strips_heuristic='hff', *, max_expansions=100000, max_depth=100, csp_max_generator_trials=3, heuristic_weight=float('inf'), actions=None, action_filter=None, use_strips_op=False, use_tuple_desc=False, use_csp_pruning=True, forward_state_variables=True, forward_derived=False, track_most_promising_trajectory=False, prob_goal_threshold=0.5, verbose=False, return_extra_info=False)[source]#
Perform heuristic search with DPLL+Sampling algorithm and STRIPS-based heuristics, for mixed discrete-continuous domains.
- Parameters:
executor (PDSketchExecutor) – the executor.
state (State) – the initial state.
goal_expr (str | ValueOutputExpression) – the goal expression.
strips_heuristic (str) – the heuristic to use. Should be a string.
max_expansions – the maximum number of expanded nodes.
max_depth – the maximum depth of the search.
csp_max_generator_trials (int) – the maximum number of trials for calling CSP generators.
heuristic_weight (float) – the weight of the heuristic. Use float(‘inf’) to do greedy best-first search.
actions (Sequence[OperatorApplier] | None) – the actions to use. If None, use all possible actions. Partially grounded actions are allowed.
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_strips_op (bool) – whether to use STRIPS operators when applying actions. Recommended to be False.
use_tuple_desc (bool) – whether to use tuple description to prune the search space.
forward_state_variables (bool) – whether to forward state variables before the search starts.
forward_derived (bool) – whether to forward derived predicates after applying actions.
track_most_promising_trajectory (bool) – whether to track the most promising trajectory.
prob_goal_threshold (float) – the probability threshold for the most promising trajectory. When there is a trajectory with probability greater than this threshold, the search will stop.
verbose (bool) – whether to print verbose information.
return_extra_info (bool) – whether to return extra information, such as the number of expanded nodes.
use_csp_pruning (bool)
- Returns:
the trajectory if succeeded, otherwise None. When return_extra_info is True, return a tuple of (trajectory, extra_info), where extra_info is a dictionary.