Behavior Trees with Dataflow: Coordinating Reactive Tasks in Lingua Franca
Alexander Schulz-Rosengarten, Akash Ahmad, Malte Clement, Reinhard von Hanxleden, Benjamin Asch, Marten Lohstroh, Edward A. Lee, Gustavo Quiros Araya, Ankit Shukla
TL;DR
The paper tackles the data-handling gap in Behavior Trees by introducing a dataflow extension implemented within Lingua Franca (LF), enabling explicit data interfaces and deterministic communication through channels. BT nodes are translated into LF reactors, including parallel nodes that enforce a threshold across $N$ children via a generated coordination reaction, and forward/backward communication patterns ensure coherent data propagation across the tree. The approach is demonstrated in an industrial use case (automated workplace) to show modular, scalable coordination of machines, AGVs, and humans, with automatic generation of textual and graphical representations. The work proposes a pragmatic, text-first modeling workflow that combines BT intuitiveness with LF’s determinism and polyglot target-language support, and outlines future extensions such as memory nodes, decorators, and formal verification.
Abstract
Behavior Trees (BTs) provide a lean set of control flow elements that are easily composable in a modular tree structure. They are well established for modeling the high-level behavior of non-player characters in computer games and recently gained popularity in other areas such as industrial automation. While BTs nicely express control, data handling aspects so far must be provided separately, e. g. in the form of blackboards. This may hamper reusability and can be a source of nondeterminism. We here present a dataflow extension to BTs that explicitly models data relations and communication. We provide a combined textual/graphical approach in line with modern, productivity-enhancing pragmatics-aware modeling techniques. We realized and validated that approach in the recently introduced polyglot coordination language Lingua Franca (LF).
