langgoap.LazyDecompositionStrategy#
- class LazyDecompositionStrategy(*, lookahead=1, inner=None)[source]#
ADaPT-style incremental planning.
Plans only the first
lookaheadactions at each planning round. After execution, the observer triggers replanning from the updated world state. The overall behaviour emerges from the GOAP loop’s existing replan machinery.Works with any inner strategy (A*, TwoPhase, custom). When the full plan has fewer actions than
lookahead, the full plan is returned unchanged.- Parameters:
lookahead (int) – Maximum number of actions to keep per planning round.
1gives pure ADaPT behaviour (plan one, execute one, replan); higher values trade more speculative planning for fewer replan cycles.inner (PlanningStrategy | None) – Inner planning strategy. Defaults to
AStarStrategywhenNone.
- __init__(*, lookahead=1, inner=None)[source]#
- Parameters:
lookahead (int)
inner (PlanningStrategy | None)
- Return type:
None
Methods
__init__(*[, lookahead, inner])plan(start, goal, actions, *[, ...])