BehaviorTree/BehaviorTree.CPP

Behavior Trees Library in C++. Batteries included.

What it solves

BehaviorTree.CPP is a C++ 17 library that provides a framework for creating Behavior Trees, which are used to manage complex decision-making processes. It serves as a flexible, reactive, and fast alternative to Finite State Machines, primarily for robotics and game AI.

How it works

The library allows developers to define the structure of their logic trees using a Domain Specific Language (DSL) based on XML, meaning the tree morphology is not hard-coded into the C++ source. This allows trees to be loaded at run-time. Custom TreeNodes can be either statically linked or loaded as plugins at run-time. The framework supports asynchronous, non-blocking actions and reactive behaviors that can execute multiple actions concurrently.

Who it’s for

It is designed for developers working in robotics, game AI, and any application requiring a complex, modular decision-making system.

Highlights

  • Asynchronous Actions: Non-blocking actions are treated as first-class citizens.
  • Reactive Behaviors: Supports orthogonality, allowing multiple actions to execute concurrently.
  • XML-based Configuration: Trees are defined in XML and loaded at run-time for greater flexibility.
  • Dataflow Mechanism: Provides a type-safe and flexible way to handle data exchange between nodes.
  • Logging and Profiling: Includes infrastructure to visualize, record, and analyze state transitions.

Related

  • Project
  • Project
  • Project
  • Project
  • Project