Jido.BehaviorTree.Nodes.Succeeder (Jido Behavior Tree v1.0.0)

View Source

A decorator node that always returns success when its child completes.

  • If child returns :success or :failure, succeeder returns :success
  • If child returns :running, succeeder returns :running
  • Errors are passed through unchanged

Example

succeeder = Succeeder.new(risky_action)
# Always succeeds even if risky_action fails

Summary

Functions

Creates a new Succeeder node wrapping the given child.

Returns the Zoi schema for this module

Context-aware tick that preserves child tick mutations.

Types

t()

@type t() :: %Jido.BehaviorTree.Nodes.Succeeder{child: any()}

Functions

new(child)

@spec new(Jido.BehaviorTree.Node.t()) :: t()

Creates a new Succeeder node wrapping the given child.

Examples

iex> Succeeder.new(child_node)
%Succeeder{child: child_node}

schema()

Returns the Zoi schema for this module

tick_with_context(state, tick)

Context-aware tick that preserves child tick mutations.