langgoap.explain_no_plan#
- explain_no_plan(start, goal, actions)[source]#
Explain why A* could not find a valid plan.
Performs a lightweight static analysis of the action set to surface two categories of failure:
Unreachable conditions — goal conditions whose required value the start state does not hold and no action produces. They can never be met regardless of ordering, so the root cause is a missing action or a typo in the goal.
Missing preconditions — precondition values that actions require but that neither hold in the start state nor are produced by any other action. These create unsatisfiable prerequisite chains.
Comparisons are value-aware:
x=Falseis not satisfied by an action that setsx=True, and0/""count as present.- Parameters:
start (PlanningState) – The initial world state from which A* searched.
goal (GoalSpec) – Goal specification whose conditions A* failed to satisfy.
actions (list[ActionSpec]) – The full set of actions A* had available.
- Returns:
A
NoPlanExplanationwith categorised unreachable conditions, missing preconditions, and a human-readable suggestion.- Return type: