langgoap.TerminationPolicy#
- class TerminationPolicy(*args, **kwargs)[source]#
Policy that decides whether the GOAP loop should terminate.
Implementations must be stateless / thread-safe and never raise; the observer wraps each call in a try/except as a last line of defence, but a well-behaved policy is fire-and-forget.
- __init__(*args, **kwargs)#
Methods
__init__(*args, **kwargs)should_terminate(state)Inspect
state(aGoapStatedict) and returnEarlyTerminationto halt the run, orNoneto continue.Attributes
nameStable identifier used in logs and termination reasons.