|
QDpy
|
Find bounded-cost plan pools and select diverse subsets. More...
Go to the source code of this file.
Classes | |
| class | qdpy.algorithms.forbid_planning.CostedPlan |
| A complete goal-reaching plan with its measured cost and final state. More... | |
| class | qdpy.algorithms.forbid_planning.ForbidPlanningResult |
| Keep the candidate pool, selected subset, and the cost of both stages. More... | |
Namespaces | |
| namespace | qdpy |
Functions | |
| qdpy.algorithms.forbid_planning.action_multiset_distance (left, right) | |
| Compute one minus weighted Jaccard similarity of the action multisets. | |
| qdpy.algorithms.forbid_planning.forbid_iterative_planning (start, *, actions, simulate, goal, size, max_depth, budget, pool_size=64, cost_ceiling=np.inf, distinct="multiset", selection="diverse", diversity="mean", distance=action_multiset_distance, distance_floor=None) | |
| Collect cost-ordered distinct plans and choose a bounded diverse subset. | |
Find bounded-cost plan pools and select diverse subsets.
Definition in file forbid_planning.py.
| qdpy.algorithms.forbid_planning.action_multiset_distance | ( | left, | |
| right ) |
Compute one minus weighted Jaccard similarity of the action multisets.
| left | First CostedPlan. |
| right | Second CostedPlan. |
Count repeated actions and ignore their ordering.
Definition at line 60 of file forbid_planning.py.
| qdpy.algorithms.forbid_planning.forbid_iterative_planning | ( | start, | |
| * | , | ||
| actions, | |||
| simulate, | |||
| goal, | |||
| size, | |||
| max_depth, | |||
| budget, | |||
| pool_size = 64, | |||
| cost_ceiling = np.inf, | |||
| distinct = "multiset", | |||
| selection = "diverse", | |||
| diversity = "mean", | |||
| distance = action_multiset_distance, | |||
| distance_floor = None ) |
Collect cost-ordered distinct plans and choose a bounded diverse subset.
| start | Initial simulator state. |
| actions | Callable (state) returning hashable action identifiers in stable order. |
| simulate | Pure callable (state, action) returning (successor, cost) or None for illegal moves. |
| goal | Predicate on the state. |
| size | Desired number of selected plans. |
| max_depth | Maximum number of actions in a candidate plan. |
| budget | Maximum number of simulator calls, including illegal moves. |
| pool_size | Maximum number of distinct candidate plans to collect. |
| cost_ceiling | Maximum cost per plan. |
| distinct | Treat reordered action multisets as equivalent, or use "sequence". |
| selection | Greedy diversity selection or cheapest-plan control ("cost"). |
| diversity | Greedy aggregation, "mean" or "minimum" pair distance. |
| distance | Symmetric nonnegative dissimilarity between completed CostedPlan values. |
| distance_floor | If supplied, find the cheapest size-plan clique with that pairwise floor. |
Adapt the forbid-and-select method to a bounded deterministic simulator. A shared uniform-cost frontier enumerates goal plans and forbids duplicate sequences or action multisets during collection. Plans may visit the same state via different prefixes. Expansion ends at the first goal of a path. Select a diverse subset from that pool by growing the most distant pair, or solve the paper's clique formulation to enforce a minimum pairwise separation.
Definition at line 172 of file forbid_planning.py.