langgoap.AStarStrategy

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). None means run until exhaustion.

  • tracer (Any) – Optional PlanningTracer that receives the search hooks. When omitted, GoapPlanner hands the strategy its own tracer, so passing strategy=AStarStrategy() explicitly keeps the same tracing as the default (#63).

  • record_expansions (bool) – Emit on_search_expand per 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, *[, ...])