langgoap.NirvanaGoal

langgoap.NirvanaGoal#

class NirvanaGoal(**kwargs)[source]#

Marker goal that is never satisfied.

Useful with UtilityStrategy for always-on agents that react to state changes opportunistically rather than aiming at a fixed completion criterion. The observer’s _is_goal_satisfied() check returns False for any NirvanaGoal instance, so the run only ends when the utility planner runs out of applicable actions (semantically: STUCK without error).

Subclasses GoalSpec so the existing planner / observer type signatures continue to accept it; the only behavioural difference is the never-satisfied semantics enforced by _is_goal_satisfied and is_nirvana().

Parameters:

kwargs (Any)

__init__(**kwargs)[source]#
Parameters:

kwargs (Any)

Return type:

None

Methods

__init__(**kwargs)

from_builder([conditions, builder_output])

Construct a GoalSpec from a BuilderOutput.

from_dict(data)

Reconstruct from to_dict() output (conditions stay empty).

per_entity(entity_ids, conditions, *[, mode])

Build a MultiGoal with one GoalSpec per entity.

to_dict()

Serialise with kind="nirvana" so rehydration keeps the marker type.

Attributes

conditions

policy

objectives

constraints

soft_goals

metrics

value

Utility weight consulted by MultiGoal(mode='best_value').