concepts.pdsketch.planners.optimistic_search.goal_test#
- goal_test(executor, state, goal_expr, csp, trajectory, csp_max_generator_trials=3, mpt_tracker=None, verbose=False)[source]#
Test whether a state satisfies a goal expression with DPLL+Sampling CSP solver.
- Parameters:
executor (PDSketchExecutor) – the executor.
state (State) – the state to be tested.
goal_expr (ValueOutputExpression) – the goal expression.
csp (ConstraintSatisfactionProblem) – the CSP that contains all constraints that has been accumulated so far.
trajectory (Sequence[OperatorApplier]) – the trajectory that leads to the current state.
csp_max_generator_trials (int) – the maximum number of trials for calling CSP generators.
mpt_tracker (MostPromisingTrajectoryTracker | None) – the tracker for the most promising trajectory.
verbose (bool) – whether to print verbose information.
- Returns:
the trajectory of grounded actions that leads to the goal state if the goal is satisfied, otherwise None.
- Return type:
List[OperatorApplier] | None