Table of Contents
Fetching ...

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).

Behavior Trees with Dataflow: Coordinating Reactive Tasks in Lingua Franca

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 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).
Paper Structure (31 sections, 8 figures)

This paper contains 31 sections, 8 figures.

Figures (8)

  • Figure 1: A screenshot of the visualization of a plant simulating the model presented in \ref{['fig:workplace-reactor']}
  • Figure 2: A bt that controls an entire plant with a hard-coded processing sequence.
  • Figure 3: The top-level reactor representing the entire program.
  • Figure 4: The AGV reactor including the inner bt specifying its behavior.
  • Figure 5: General structure of a fsm translation of a bt, adapted from Colledanchise and Ögren ColledanchiseO18
  • ...and 3 more figures