langgoap.AStarStrategy#
- class AStarStrategy(*, time_budget_ms=None, tracer=None, record_expansions=False)[source]#
Pure A* construction heuristic.
Delegates to
langgoap.planner.astar.plan(). Use this when a goal has neither constraints nor objectives and CSP overhead is unwanted.- Parameters:
time_budget_ms (float | None) – Optional wall-clock budget in milliseconds. When set, A* returns the best complete plan found within the budget (anytime behaviour).
Nonemeans run until exhaustion.tracer (Any) – Optional
PlanningTracerthat receives the search hooks. When omitted,GoapPlannerhands the strategy its own tracer, so passingstrategy=AStarStrategy()explicitly keeps the same tracing as the default (#63).record_expansions (bool) – Emit
on_search_expandper expanded node.
- __init__(*, time_budget_ms=None, tracer=None, record_expansions=False)[source]#
- Parameters:
time_budget_ms (float | None)
tracer (Any)
record_expansions (bool)
- Return type:
None
Methods
__init__(*[, time_budget_ms, tracer, ...])plan(start, goal, actions, *[, ...])