Behaviour Trees for Evolutionary Robotics

Kirk Y. W. Scheper, Sjoerd Tijmons, Coen C. de Visser, Guido C. H. E. de CroonarXiv 2014

TL;DR

This paper presents the first application of Behavior Trees (BTs) within the Evolutionary Robotics (ER) framework for a real-world robotic platform. By evolving BTs instead of traditional "black-box" neural networks, the researchers created a controller for a 20-gram flapping-wing drone that is not only effective at flying through windows but also highly intelligible, allowing humans to manually bridge the "reality gap" between simulation and the real world.

What Problem Does This Paper Address?

Evolutionary Robotics (ER) uses Darwinian principles to "breed" robot controllers in simulation. While powerful, ER typically relies on Artificial Neural Networks (ANNs). ANNs are notoriously difficult for humans to interpret; when an evolved behavior fails in the real world due to simulation inaccuracies—a phenomenon known as the reality gap—it is nearly impossible to manually "fix" the network.

The authors address this by replacing ANNs with Behavior Trees. BTs are hierarchical control structures (originally from the gaming industry) that represent logic through a tree of conditions and actions. The goal was to see if BTs could be evolved to perform a complex task—autonomous window navigation for a Micro Air Vehicle (MAV)—while remaining simple enough for a human to understand and tune.

Methods

The researchers used the DelFly Explorer, a 20-gram bio-inspired flapping-wing MAV equipped with a 4-gram onboard stereo vision system.

Figure 1. DelFly Explorer 20-gram flapping wing MAV in flight with 4-gram dual camera payload. An onboard stereo vision algorithm generates a depth map of the environment which is used for autonomous navigation.

The Behavior Tree Framework

The BTs were composed of:

  • Composite Nodes: Selectors (logical OR) and Sequences (logical AND) that control the flow of execution.
  • Leaf Nodes: Conditions (e.g., "Is the window visible?") and Actions (e.g., "Turn rudder right").
  • Blackboard: A shared memory space where vision algorithms post data (window location, disparity maps) for the BT to query.

Evolutionary Strategy

The authors used an Evolutionary Algorithm (EA) to optimize the BTs in a 3D simulation environment (SmartUAV).

  • Initialization: Trees were generated using the "grow method" to ensure diverse shapes and sizes.
  • Selection: Tournament selection with a "parsimony pressure" (favoring smaller trees to prevent bloat).
  • Crossover & Mutation: Subtrees were swapped between "parents" or randomly replaced to explore new behaviors.
Figure 5. Sample parent trees with selected nodes for crossover highlighted. Two-parent, single point Crossover is used for evolution.

Datasets

The study did not use a static dataset but rather two distinct environments:

  1. Simulation (SmartUAV): A virtual $8 \times 8 \times 3\text{m}$ room with textured walls and a $0.8\text{m}$ window. This served as the "training ground" where thousands of flight iterations occurred.
  2. Real-World Testbed: A $5 \times 5 \times 2\text{m}$ room with physical textures (newspapers on walls) and a matching window. This was used to evaluate the final evolved and human-tuned controllers.

Key Insights and Ideas

  • Intelligibility as a Tool: The primary "aha moment" is that human readability is a functional feature, not just a convenience. Because the evolved BT was intelligible, the researchers could look at it, identify why it was failing in the real world (e.g., a threshold for window detection was too strict), and adjust a single parameter to fix it.
  • Simplicity Wins: The evolved BT was significantly smaller (8 nodes) than the human-designed baseline (26 nodes), yet it performed better. Evolution found a minimalist logic that humans overlooked.
  • Bias-Variance Trade-off: By preprocessing raw pixels into high-level features (like "sum of disparity") before feeding them to the BT, the authors introduced a beneficial "bias." This restricted the search space, making the evolution more efficient and the resulting behavior more robust to noise.

Key Results

The study compared the genetically optimized BT against a human-designed BT baseline:

Metric Human-Designed BT Genetically Optimized BT
Tree Size (Nodes) 26 8
Simulated Success Rate 82% 88%
Real-World Success Rate 46% 54%

While the success rate dropped when moving to the real world (the reality gap), the evolved BT still outperformed the human-designed version. Crucially, the evolved BT avoided a "corner-trapping" failure mode that plagued the human design.

Figure 3. Graphical depiction of user-defined BT for the fly-through-window task. Different sub-behaviours of the flight are encapsulated in boxes. x is the position of the centre of the window in frame, σ is window response value, Σ is sum of disparity, ∆is the horizontal difference in disparity and r is the rudder deflection setting for the simulated DelFly II.

Limitations and Future Work

  • Manual Tuning: While BTs are easier to tune than ANNs, the process still required human intervention to bridge the reality gap. Future work could involve "online evolution" where the robot adapts its own BT parameters in real-time.
  • Control Constraints: The current study limited the MAV to directional control (steering). Height control was managed manually or kept constant; integrating vertical autonomy is a logical next step.
  • Environmental Sensitivity: The evolved behavior was somewhat specific to square rooms. Testing in more varied or dynamic environments would be necessary to prove general robustness.

Summary updated

BibTeX
@misc{scheper2014behaviour,
  author = {Kirk Y. W. Scheper and Sjoerd Tijmons and Coen C. de Visser and Guido C. H. E. de Croon},
  title = {{Behaviour Trees for Evolutionary Robotics}},
  year = {2014},
  eprint = {1411.7267},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1411.7267},
}
Figure