Table of Contents
Fetching ...

Comparison between Behavior Trees and Finite State Machines

Matteo Iovino, Julian Förster, Pietro Falco, Jen Jen Chung, Roland Siegwart, Christian Smith

TL;DR

This study provides a concrete, metrics‑driven comparison of Behavior Trees (BTs) and Finite State Machines (FSMs) for robot control in mobile manipulation tasks. By keeping low‑level skills identical and varying only the policy container, it demonstrates that BTs deliver superior scalability, modularity, and inherent reactivity, while FSMs remain straightforward for simple tasks. The paper introduces and applies formal metrics, including Graph Edit Distance and complexity measures, to quantify structural changes and reactivity costs, and validates findings through Gazebo simulations and a real robot. The results support adopting BTs for complex, reconfigurable robot behavior, with HFSMs and hybrid designs offering practical pathways when intermediate modularity or memory is needed.

Abstract

Behavior Trees (BTs) were first conceived in the computer games industry as a tool to model agent behavior, but they received interest also in the robotics community as an alternative policy design to Finite State Machines (FSMs). The advantages of BTs over FSMs had been highlighted in many works, but there is no thorough practical comparison of the two designs. Such a comparison is particularly relevant in the robotic industry, where FSMs have been the state-of-the-art policy representation for robot control for many years. In this work we shed light on this matter by comparing how BTs and FSMs behave when controlling a robot in a mobile manipulation task. The comparison is made in terms of reactivity, modularity, readability, and design. We propose metrics for each of these properties, being aware that while some are tangible and objective, others are more subjective and implementation dependent. The practical comparison is performed in a simulation environment with validation on a real robot. We find that although the robot's behavior during task solving is independent on the policy representation, maintaining a BT rather than an FSM becomes easier as the task increases in complexity.

Comparison between Behavior Trees and Finite State Machines

TL;DR

This study provides a concrete, metrics‑driven comparison of Behavior Trees (BTs) and Finite State Machines (FSMs) for robot control in mobile manipulation tasks. By keeping low‑level skills identical and varying only the policy container, it demonstrates that BTs deliver superior scalability, modularity, and inherent reactivity, while FSMs remain straightforward for simple tasks. The paper introduces and applies formal metrics, including Graph Edit Distance and complexity measures, to quantify structural changes and reactivity costs, and validates findings through Gazebo simulations and a real robot. The results support adopting BTs for complex, reconfigurable robot behavior, with HFSMs and hybrid designs offering practical pathways when intermediate modularity or memory is needed.

Abstract

Behavior Trees (BTs) were first conceived in the computer games industry as a tool to model agent behavior, but they received interest also in the robotics community as an alternative policy design to Finite State Machines (FSMs). The advantages of BTs over FSMs had been highlighted in many works, but there is no thorough practical comparison of the two designs. Such a comparison is particularly relevant in the robotic industry, where FSMs have been the state-of-the-art policy representation for robot control for many years. In this work we shed light on this matter by comparing how BTs and FSMs behave when controlling a robot in a mobile manipulation task. The comparison is made in terms of reactivity, modularity, readability, and design. We propose metrics for each of these properties, being aware that while some are tangible and objective, others are more subjective and implementation dependent. The practical comparison is performed in a simulation environment with validation on a real robot. We find that although the robot's behavior during task solving is independent on the policy representation, maintaining a BT rather than an FSM becomes easier as the task increases in complexity.
Paper Structure (37 sections, 5 equations, 21 figures, 3 tables)

This paper contains 37 sections, 5 equations, 21 figures, 3 tables.

Figures (21)

  • Figure 1: Behavior Tree automatically generated by a planner using the backchaining method.
  • Figure 2: State Machine executing a sequence of actions to solve a mobile pick and place task.
  • Figure 3: Backchained BT realizing a chattering controller.
  • Figure 4: Reactive State Machine to solve a mobile pick and place task. Transitions are Running (yellow), Success (green) and Failure (red).
  • Figure 5: Example BT subtree. Its equivalent HFSM is shown in Fig. \ref{['fig:HFSM']}.
  • ...and 16 more figures