Ricardas Dukauskas Homepage

Minimalist Behaviour Tree

This is a minimalist behaviour tree. It does not have many features well because it is minimalist. It was done to aid one of the course works on my 2nd year but was not part of it, just an extra.
The API explanation is available on Behaviour.h file.

Place the source foldier in your project and include Behavior.h
To create behaviour just make an instance of Behaviour class and add all the nodes you need.

This behaviour tree supports

  • Branches
  • Sequence
  • Selector

Leaf nodes

  • void function call
  • boolean function call
  • boolean varieble check

Decorator is available but no example decorators are implemented.

It is hard to use for big projects.
By looking at the code right now (rouhly half a year later) I don't think copy works with different types of entities because it passes the pointer of the caller and uses that as a reference. So using Same branch of the tree on a different instance of the object will not work (haven't tested but it seems so).

Download link

Source: HERE
You are free to use source but do not claim you wrote the original. Apache 2.0 License.