langgoap.StuckHandler

langgoap.StuckHandler#

class StuckHandler(*args, **kwargs)[source]#

Recovery hook fired when the planner cannot find a plan.

Implementations inspect the current state (typically the GoapState dict at the moment of failure) and the optional reason (a NoPlanExplanation from explain_no_plan()) and return a StuckHandlerResult that either resolves the situation (REPLAN) or declines (NO_RESOLUTION).

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

handle_stuck(state, reason)

Try to recover from a stuck situation.

Attributes

name

Stable identifier for this handler.