Skip to content
Bit Quirky Behavior Trees and
State Machines

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or enter a complete API identifier.

Browse the reference instead

Esc closes · Tab reaches results · Enter opens the focused link

v0.11.0
Menu

BitQuirky.Behavior.Nodes.Decorator

Public behavior trees and state machines: runtime backend symbols in BitQuirky.Behavior.Nodes.Decorator.

Source snapshot 29003d8b1658.

Assembly: BitQuirky.Behavior.Runtime.Backend

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.Decorator.Conditional

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Conditional.cs:21-39

Decorator that admits and runs its single child only while a continuously observed fact succeeds, and cancels that child synchronously when the fact fails and the decorator carries the Self abort scope.

Responsibilities:

  • Provide the baked / token identity for cross-layer correspondence.
  • Encode the admission rule for the runtime tick job.

Does NOT:

  • Hold per-instance observation state; that lives on the per-follower runtime instance.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = Conditional

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Conditional.cs:28

Baked runtime node kind.

C#
public const string NodeKindToken = "conditional"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Conditional.cs:24-25

Canonical source node-kind token.

C#
public static bool Admit(BitQuirky.Behavior.Execution.BehaviorResultCode factResult)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Conditional.cs:35-38

Admit the decorated child for one evaluation.

Parameters

  • factResult: The just-evaluated observed-fact result.

Returns

Whether the child may run under the observed fact.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.Decorator.Inverter

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Inverter.cs:21-47

Decorator that flips its child’sSuccess andFailure. Other status codes pass through unchanged so authority / timeout / interrupted information reaches parents intact.

Responsibilities:

  • Encode the canonical inversion rule for the runtime tick job and bake-time validation.

Does NOT:

  • Re-tick its child - this is a stateless decorator; the child is ticked once per parent tick.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = Inverter

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Inverter.cs:28

Baked node kind an inverter bakes to.

C#
public const string NodeKindToken = "inverter"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Inverter.cs:24-25

Kind token an inverter carries in authored graph source.

C#
public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Inverter.cs:35-46

Maps the child’s status to the decorator’s own: Success becomes Failure and Failure becomes Success. Running, Blocked, Interrupted, Timeout, and AuthorityMismatch pass through unchanged, so a parent still sees why the subtree stopped.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.Decorator.Repeat

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:49-219

Decorator that re-ticks its single child according to a RepeatPolicy.

Responsibilities:

  • Encode the repeat aggregation rule for the runtime tick job.
  • Provide the baked / token identity for cross-layer correspondence.

Does NOT:

  • Hold per-instance counters; those live in the per-follower artifact-indexed runtime state.

C#
public const int CountParameterId = 967958004

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:109

Stable baked id for the bounded repeat-count parameter.

C#
public const int CountPolicyId = 967958004

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:112

Stable baked id for CountPolicyToken.

C#
public const string CountPolicyToken = "count"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:94

Canonical source token for bounded repeat behavior.

C#
public const int ForeverPolicyId = 2056224888

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:115

Stable baked id for ForeverPolicyToken.

C#
public const string ForeverPolicyToken = "forever"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:97

Canonical source token for repetition until the containing behavior exits.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = Repeat

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:128

Baked runtime node kind.

C#
public const string NodeKindToken = "repeat"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:124-125

Canonical source node-kind token.

C#
public const int PolicyParameterId = -826213761

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:106

Stable baked id for the repeat policy parameter.

C#
public const int StopOnFailureParameterId = 1269204074

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:91

Stable baked identifier of the optional early termination flag.

C#
public const string StopOnFailureParameterToken = "stop_on_failure"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:88

Optional early termination after an authored failed or blocked attempt.

C#
public const int UntilFailurePolicyId = -1384370814

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:118

Stable baked id for UntilFailurePolicyToken.

C#
public const string UntilFailurePolicyToken = "until_failure"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:100

Canonical source token for repeat-until-child-failure behavior.

C#
public const int UntilSuccessPolicyId = 1828212339

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:121

Stable baked id for UntilSuccessPolicyToken.

C#
public const string UntilSuccessPolicyToken = "until_success"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:103

Canonical source token for repeat-until-child-success behavior.

Decorate(BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, RepeatPolicy policy, bool stopOnFailure, out int iterationsCompletedNext)

Section titled “Decorate(BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, RepeatPolicy policy, bool stopOnFailure, out int iterationsCompletedNext)”
C#
public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, BitQuirky.Behavior.Nodes.Decorator.RepeatPolicy policy, bool stopOnFailure, out int iterationsCompletedNext)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:154-218

Aggregates one child result with optional early failure termination.

Decorate(BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, RepeatPolicy policy, out int iterationsCompletedNext)

Section titled “Decorate(BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, RepeatPolicy policy, out int iterationsCompletedNext)”
C#
public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, BitQuirky.Behavior.Nodes.Decorator.RepeatPolicy policy, out int iterationsCompletedNext)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:142-151

Aggregate one child tick.

Parameters

  • childStatus: The just-finished child’s status.
  • iterationsCompleted: Number of completed Success, Failure, or Blocked attempts before this tick.
  • targetCount: For FixedCount: the desired iteration count.
  • policy: Termination policy.
  • iterationsCompletedNext: The new iteration counter the runtime should record for the per-follower state.

Category: Node contracts

C#
enum BitQuirky.Behavior.Nodes.Decorator.RepeatPolicy

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:11-35

Underlying type: byte

Repeat termination policy.

C#
FixedCount = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:17

Repeatcountcompleted attempts, then return the final child’s result. Negative or zero count is treated as one tick (no repeat).

C#
Forever = 3

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:34

Restart after every completed child attempt until the containing behavior exits.

C#
UntilFailure = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:23

Repeat indefinitely after Success or Running. Stops on child Failure or Blocked, returned through to the parent.

C#
UntilSuccess = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:29

Repeat indefinitely after Failure, Blocked, or Running. Stops on child Success, returned through to the parent.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.Decorator.TimeLimit

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/TimeLimit.cs:24-59

Decorator that imposes a selected-tick wall-clock budget on its decorated subtree. If the elapsed time since the subtree became active reaches the configured budget while a descendant is still Running, the decorator returns Timeout(typed reason for ).

Responsibilities:

  • Encode the timeout aggregation rule for the runtime tick job.
  • Provide the baked / token identity for cross-layer correspondence.

Does NOT:

  • Sample the wall clock; the tick job feeds in elapsed seconds so the rule remains pure and Burst-callable.
  • Cancel awaited externals; that is the runtime instance’s job when it sees the Timeout result.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = TimeLimit

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/TimeLimit.cs:31

Baked node kind a time limit bakes to.

C#
public const string NodeKindToken = "timelimit"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/TimeLimit.cs:27-28

Kind token a time limit carries in authored graph source.

C#
public const int SecondsParameterId = 1723256298

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/TimeLimit.cs:38

Stable baked id of the authored wall-clock budget parameter, BehaviorNodeParameterTokens.Seconds. A node without one keeps a zero budget and never expires, exactly as before the parameter existed.

Decorate(BehaviorNodeStatus childStatus, float elapsedSeconds, float budgetSeconds)

Section titled “Decorate(BehaviorNodeStatus childStatus, float elapsedSeconds, float budgetSeconds)”
C#
public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus, float elapsedSeconds, float budgetSeconds)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/TimeLimit.cs:46-58

Reports Timeout when the decorated subtree is still running and elapsedSeconds has reached budgetSeconds; otherwise passes the child’s status through. Both times are in seconds, measured since the subtree became active, and a budget of zero or less never expires.

Source fingerprint: sha256:29003d8b1658b98a79bebcd93e3b4030caf8511268b96817ab764d63df8d6c3b

Full-size image