Temporal Behavior Trees: Temporal Control
- Temporal Behavior Trees (TBTs) are formal frameworks that extend classical behavior trees by making time, ordering, concurrency, and partial progress explicit.
- They integrate continuous-time control, STN-derived planning, and STL-based specifications to enable modular, hierarchical, and robust execution in dynamic environments.
- TBTs support formal analysis and synthesis using discontinuous dynamical systems theory, trace repair methods, and ternary semantics for precise execution and learning.
Temporal Behavior Trees (TBTs) are formalisms that make behavior trees temporally explicit. In the literature, the term covers several closely related constructions: continuous-time BT controllers modeled as discontinuous dynamical systems, BT executors compiled from temporal plans and Simple Temporal Networks (STNs), and BT-structured temporal specifications whose leaves are Signal Temporal Logic (STL) formulas and whose semantics support monitoring, repair, learning, and control synthesis (Sprague et al., 2021, Zapf et al., 2024, Schirmer et al., 10 Sep 2025, Matheu et al., 13 Apr 2026). Across these variants, the common objective is to preserve the modular and hierarchical control-flow structure of BTs while making time, ordering, concurrency, and partial progress first-class formal objects.
1. Scope of the term and its main research lines
The literature does not use Temporal Behavior Trees for a single universally fixed syntax. Instead, it uses BT structure to organize temporal control or temporal specification in at least three technically distinct ways.
| Research line | Core formal object | Primary role |
|---|---|---|
| Continuous-time BTs | Controller analysis and convergence | |
| STN-derived temporal BTs | BT compiled from an STN over snap actions | Temporal-plan execution |
| STL-based TBTs | BT operators over STL leaves | Specification, repair, and synthesis |
In the continuous-time line, a BT is interpreted as a hierarchical switching controller whose active vector field depends on the current state (Sprague et al., 2021). In the STN-based line, the BT is a runtime executor that respects causal and temporal constraints extracted from a PDDL 2.1 temporal plan, including required concurrency (Zapf et al., 2024). In the STL-based line, BT composition operators such as sequence, fallback, and parallel are lifted into a formal language over finite traces, enabling Boolean and robust semantics, trace segmentation, repair, and optimization-based synthesis (Schirmer et al., 10 Sep 2025, Matheu et al., 13 Apr 2026).
A common misconception is to equate TBTs with ordinary BTs plus timers. The published formalisms are more structured than that. They either introduce explicit state-space partitions and discontinuous flows, explicit STN-derived guards such as WaitTime and CheckTime, or compositional semantics over traces in which split points, suffixes, and quantitative robustness are part of the definition of satisfaction.
2. Continuous-time BTs as discontinuous dynamical systems
A continuous-time BT can be written as the closed-loop system
where is the state, is the local control law associated with node , and is the operating region in which that node is active (Sprague et al., 2021). This formalization treats BT execution as continuous in time rather than as a difference equation with step .
The BT acts as a nested switching controller. For the root node, the state space is partitioned by child operating regions. A representative construction is
with pairwise disjoint, and the root controller given by
Each node further carries a region of relevance or operating region 0, a success region 1, and a failure region 2, with 3 pairwise disjoint for a single BT node.
This induces piecewise-defined continuous-time evolution: trajectories flow under one vector field within a region and switch when the state enters a region that activates a different child. The resulting object is a discontinuous dynamical system and therefore a subclass of hybrid dynamical systems. The analysis explicitly invokes discontinuous-system theory, including Filippov solutions, and uses existence and uniqueness results as preliminaries for a general convergence theorem with sufficient conditions for convergence to a desired equilibrium point or desired region of the state space (Sprague et al., 2021).
The significance of this formulation is methodological. Earlier BT analyses had already compared BTs and hybrid systems, but only informally and only in discrete time. The continuous-time formulation allows BT controllers to be analyzed with continuous-time control tools, nonsmooth dynamics, and convergence arguments that are not naturally available in purely sampled BT semantics. The same framework can also absorb open-loop or time-dependent policies by augmenting the state with time,
4
thereby recasting time-dependent execution as augmented state feedback.
3. Temporal-plan execution via STNs and BT compilation
A second TBT line addresses the execution of temporal plans in uncertain robotic environments. The motivating setting is a PDDL 2.1 temporal plan
5
where each tuple is a time-triggered durative action occurrence, with start time 6, durative action 7, and actual duration 8 (Zapf et al., 2024). A durative action 9 is described by start and end snap actions 0 and 1, an overall condition 2, and duration bounds 3 and 4.
The plan is first transformed into an induced simple plan over instantaneous snap actions at the happening time points
5
An STN is then built as a directed weighted graph 6 whose edges encode difference constraints
7
A pair of opposite bounds yields an interval, so that if 8 has weight 9 and 0 has weight 1, then 2 (Zapf et al., 2024).
The STN construction algorithm operates over snap-action nodes rather than whole actions. Each node contains fields such as the action start time, action expression, duration, snap-action type in 3, grounded conditions, grounded effects, and incoming and outgoing links. The resulting STN includes satisfying links, threat avoidance links, and temporal links. GETSATISFY searches backward for actions whose effects make a condition become true, while GETTHREAT detects actions that invalidate preconditions or effects and enforces PDDL 2.1’s no moving targets rule. After graph construction, Floyd–Warshall APSP is applied to propagate all-pairs temporal bounds.
The second stage compiles the STN into a BT. Each STN node becomes a BT template. Start-action templates include CheckAtStart, CheckOverall, CheckTime, ExecuteAction, and ApplyAtStart; end-action templates include CheckAtEnd, WaitAction, WaitTime, ApplyAtEnd, and CheckAction (Zapf et al., 2024). The tree is generated by depth-first search with the explicit restriction that each STN node may appear only once in the BT, so every node in the BT has at most one parent. Revisited dependencies are encoded by waiting or checking nodes rather than subtree duplication. If a node has multiple outgoing links, the construction inserts PARSTART(|n.Y|, t+1) and PARFINISH(t+1), enabling runtime concurrency.
The essential temporal mechanism is therefore not merely time stamping, but the embedding of event-based and time-based constraints into executable control flow. WaitTime(t) delays execution until a prescribed time, CheckTime(t) fails if the time window has been missed, WaitAction(a) blocks until a predecessor action completes, and CheckAction(a) fails if a required predecessor has not completed when needed. This permits required concurrency, including cases in which one action must execute strictly between the start and end of another. In the reported PlanSys2 implementation, the improved STNBTBuilder preserved concurrency and reduced mean execution time relative to the previous SimpleBTBuilder in a real Tiago robot laboratory task: mean 4 s versus 5 s over 10 runs, with the other reported statistics following the same trend (Zapf et al., 2024).
4. TBTs as hierarchical temporal specifications over traces
A third and increasingly prominent formulation treats TBTs as a specification language over finite traces. The syntax combines BT composition operators with STL leaves: 6
where 7 is an STL formula (Schirmer et al., 10 Sep 2025, Puranic et al., 5 Apr 2026). The intended meanings are standard BT-style control flow lifted to trace semantics: Fallback succeeds if at least one child succeeds, Parallel_M succeeds if at least 8 distinct children succeed, Sequence requires that the trace can be split into a prefix satisfying the first child and a suffix satisfying the second, and Leaf(\varphi) reduces to STL satisfaction.
The Boolean semantics is defined directly over finite traces. In particular, fallback introduces existential choice over both child index and suffix, parallel requires a sufficiently large subset of children to hold over the same trace segment, and sequence introduces an existential split point (Schirmer et al., 10 Sep 2025). This turns BT composition from an operational control idiom into a compositional specification language.
The quantitative extension is robust semantics. Instead of returning only true or false, the semantics returns a real value whose sign indicates satisfaction or violation and whose magnitude indicates the degree of satisfaction or violation. The key algebraic rule is that 9 and 0 are replaced by 1, while 2 and 3 are replaced by 4 (Schirmer et al., 10 Sep 2025). For example, for a finite execution trace 5,
6
7
8
and
9
This specification view makes TBTs structurally close to BTs while preserving the formal expressiveness of STL at the leaves. The literature positions them explicitly between standard BTs and temporal logics: BTs supply modularity, readability, sequence, fallback, parallel composition, and repetition; STL supplies formal temporal predicates over trajectories (Schirmer et al., 10 Sep 2025). The resulting language is used for task decompositions such as UAV ship landing phases or multi-goal reach-avoid tasks, including specifications like
0
which encodes that any two of three goals must eventually be reached (Puranic et al., 5 Apr 2026).
A useful correction to a common oversimplification is that, in this line of work, TBT leaves are not necessarily actions. They are local temporal properties, and the tree composes those properties rather than directly prescribing a controller implementation.
5. Monitoring, trace repair, and learning from imperfect behavior
Once TBTs are given formal trace semantics, they support post hoc analysis and repair. The trace-repair problem is posed as follows: given a system model 1, a TBT specification 2, and a violating trace 3 with 4, compute a repaired trace 5 that satisfies 6 while changing the original trace as little as possible (Schirmer et al., 10 Sep 2025). The repair preserves trace length, and if no repaired trace of the same length exists, the output is 7.
A generic repair formulation is
8
subject to model consistency, TBT satisfaction, and any additional repair constraints (Schirmer et al., 10 Sep 2025). The reported costs include 9 distance, Hamming distance, TBT robustness, and a weighted combination of these terms. In a related learning framework, the analogous optimization is written for a violating demonstration trajectory 0 and a repaired trajectory 1 of the same length, with
2
where 3 is Manhattan distance in grid-world and Euclidean distance in continuous tasks (Puranic et al., 5 Apr 2026).
The direct optimization is expressed as a mixed-integer linear program. For full TBT repair, the encoding uses segment-indexed binary variables 4, with representative clauses for Leaf, Fallback, Par_M, and Seq, and the paper reports that this requires 5 binary variables for a trace of length 6 (Schirmer et al., 10 Sep 2025). That scaling makes monolithic MILP impractical on long traces.
Two practical strategies address this. Incremental repair exploits trace segmentation with respect to a TBT, repairing violated local segments first and enlarging scope only when necessary; the procedure is described as sound and terminating (Schirmer et al., 10 Sep 2025). Landmark-based repair handles disjunctive choices by selecting candidate witnesses using robust semantics as a heuristic, replacing many mixed-integer choices with a more efficient linear program when possible. Empirically, the method repaired traces with more than 25,000 entries in under ten minutes while the full MILP ran out of memory, and on the UAV ship-landing benchmark the landmark-based method found a first solution after about 12 seconds and a comparable-quality solution in about 40 seconds (Schirmer et al., 10 Sep 2025).
TBT-guided repair has also been integrated into downstream policy learning. In that setting, demonstrations that violate a TBT are first repaired; the repaired set is then used to extract potential functions over pose space, which shape reinforcement-learning rewards in the standard potential-based form
7
with the explicit claim that this does not alter the set of optimal policies (Puranic et al., 5 Apr 2026). The repaired trajectories thus serve simultaneously as logically consistent data, interpretable corrections, and a source of shaping structure. Reported results include repairs under 1 second in a 8 grid-world, repairs under 3 seconds in a continuous single-agent reach-avoid task, 100% success for both the proposed method and an expert-reward PPO baseline in the single-agent setting, and a 47% lower cost rate than the expert-reward baseline in the multi-agent setting (Puranic et al., 5 Apr 2026).
6. Three-valued and ternary semantics for execution and synthesis
A recurring semantic issue in BTs is that node status is not naturally Boolean. Standard execution distinguishes success, failure, and running. An early formal bridge modeled BT control flow with a three-valued “Active Logic” whose values are 9 for failing, 0 for running or indeterminate, and 1 for complete or success, and mapped sequence and selector to short-circuiting logical operators in C# (Souza, 2020). That work also emphasized the distinction between stateless execution, in which composites re-evaluate from the beginning on each tick, and stateful execution, in which progress is remembered between ticks.
This three-valued perspective is carried into recent TBT synthesis work through Kleene’s strong logic 2, with truth values 3, 4, and 5 explicitly identified with BT statuses Failure, Running, and Success (Matheu et al., 13 Apr 2026). The central use of 6 is to represent cases where a partial trajectory has neither fully satisfied nor fully violated a temporal specification. The same value is also used to encode uncertainty near predicate thresholds: 7 for a user-defined uncertainty threshold 8.
Within this framework, TBT syntax extends STL by adding BT-inspired operators
9
where 0 is an STL formula (Matheu et al., 13 Apr 2026). For binary sequence and selector, the semantics is defined by existentially quantifying a split point over the available partial horizon: 1
2
The same paper gives mixed-integer encodings for partial-trajectory STL and TBTs. Ternary truth values are mapped to integers by
3
so each satisfaction variable is 4 (Matheu et al., 13 Apr 2026). Predicate satisfaction is encoded with three binaries and big-5 constraints; negation becomes 6; conjunction and disjunction become min and max over ternary variables. For timed formulas over partial horizons, the encodings distinguish the case where the temporal window is fully contained in the available horizon from the case where it is not, in which case the result can remain 7 unless a definite short-circuit value is already available. Sequence and selector are then encoded recursively using conjunctions, disjunctions, and split points.
This enables correct-by-construction control synthesis for linear dynamical systems
8
with a finite-horizon mixed-integer quadratic program that minimizes quadratic effort while enforcing TBT satisfaction (Matheu et al., 13 Apr 2026). The paper reports explicit complexity growth for the sequence operator—9 constraints for 0 subformulas and as much as 1 over the full horizon—highlighting the computational cost of partial-horizon reasoning. The broader implication is that ternary semantics turn TBTs from an offline monitoring and repair formalism into a specification language suitable for synthesis under finite-horizon uncertainty.
Taken together, these strands show that TBTs are best understood as a family of temporal extensions of BTs rather than a single fixed calculus. The unifying principle is the preservation of BT modularity under formal temporal semantics: state-space partitions and switching in continuous-time control, STN-derived guards in temporal-plan execution, and compositional Boolean, robust, or ternary semantics in specification, repair, learning, and synthesis.