Notice: this site is under development.

Libraries officials and community-maintained

Architecture

  • Based on the work of (Marzinotto et al., 2014), in which they propose a formal, consistent and general definition of Behavior Trees;
  • Optimized to control multiple agents: you can use a single behavior tree instance to handle hundreds of agents;
  • It was designed to load and save trees in a JSON format, in order to use, edit and test it in multiple environments, tools and languages;

Official libraries maintained by Behavior3 team

Behavior3JS

Javascript

// Creating a Behavior Tree
var tree = new b3.BehaviorTree();

tree.root = new b3.Sequence({children: [
  new b3.Priority({children: [
    new MyAction(),
    new b3.Wait(1000)
  ]})
]});
// Creating an Action Node
var MyAction = b3.Class(b3.Action);

MyAction.prototype.name = 'MyAction';

MyAction.prototype.tick = function(tick) {
    // action code here
}

Behavior3PY

Python

// Creating a Behavior Tree
tree = b3.BehaviorTree();

tree.root = b3.Sequence(children=[
  b3.Priority(children=[
    MyAction(),
    b3.Wait(1000)
  ])
]);
// Creating an Action Node
class MyAction(b3.Action):
    def tick(self):
        # action code here
        pass

Community libraries maintained by community folks

Want to see your library here? Create an issue.

//