langgoap.RepairStrategy#
- class RepairStrategy(inner=None)[source]#
Plan-repair wrapper around any inner
PlanningStrategy.On the first planning call (
prior_plan=None), delegates to the inner strategy unchanged. When aprior_planis supplied (i.e. the planner is replanning after state drift), attemptsrepair_plan()first. Blacklisted actions and single-use actions that already ran are never kept in the reused prefix. Falls back to a full inner-strategy replan only when repair fails to produce a valid plan, or when no prefix was reusable and the inner strategy is not plain A* (so CSP refinement still applies).- Parameters:
inner (PlanningStrategy | None) – The base strategy to delegate to. Defaults to
AStarStrategywhenNone.
- __init__(inner=None)[source]#
- Parameters:
inner (PlanningStrategy | None)
- Return type:
None
Methods
__init__([inner])plan(start, goal, actions, *[, ...])Return a plan, attempting repair when
prior_planis given.