15 releases

0.2.6 Sep 18, 2023
0.2.5 Sep 18, 2023
0.2.4 Aug 28, 2023
0.1.9 Aug 6, 2023
0.1.7 Jul 29, 2023

#535 in Game dev

Download history 69/week @ 2023-07-15 122/week @ 2023-07-22 62/week @ 2023-07-29 70/week @ 2023-08-05 21/week @ 2023-08-12 38/week @ 2023-08-19 57/week @ 2023-08-26 20/week @ 2023-09-02 7/week @ 2023-09-09 79/week @ 2023-09-16

164 downloads per month
Used in f-tree

Custom license

10K SLoC


Forester - A fast orchestration engine, implementing behavior trees.

Visualization of the tree


Forester represents a framework that provides the toolkit to perform the effective task orckestrations. The tasks can be performed synchronously or asynchronously, locally or remotely. Forester takes care of the correct performance and distribution of the tasks. The main concept of the framework is the flow based on the behavior trees it can be effectively used in the game, ai, robotic areas, or anywhere where the workflow engine can be applied.


The language is very simple

import "std::actions"

root main sequence {
    store_str("info", "initial")
    retryer(task({}), success())

fallback retryer(t:tree, default:tree){
    retry(5) t(..)
    fail("just should fail")

impl task(config: object);

and simulator test

fn smoke() {
    let mut sb = SimulatorBuilder::new();

    let root = test_folder("simulator/smoke");


    let mut sim = sb.build().unwrap();
    let tracer = &sim.forester.tracer;

or running from the console

forest sim --root tree\tests\simulator\smoke\  --profile sim.yaml

Why Forester

The main idea and the target of Forester is to make the process of chaining a complex logic of the different tasks together effective and easy.

The following set of features is summoned to highlight the framework among the others.

  • The dsl to describe the logic
  • The framework provides the ability to create async and sync tasks
  • The framework provides the ability to create remote and local tasks
  • The tooling to visualize and trace the execution of the tree
  • The simulation mode is supposed to aid with the design decisions
  • The optimizations and analysis of the tree
  • The validation engine allows the users to create the manually defined validations

Why behavior trees

Firstly, they provide a strong math abstraction over the orchestration logic
and enables to separate the business logic and the tree logic itself.

On the other hand, they have only a small set of logically conjucted components making the design easier,

Articles that introduce into the basics of the behavior trees


The common documentation is available as a mini-book, describing all aspects of working with the framework



Currently, the project is under active development (there are a lot of blind spots), so any help is highly appreciated. Any help is highly appreciated at any stage of the project but at now especially.

A guideline about contributing to Forester can be found in the CONTRIBUTING.md file.


Forester is released under the Apache License, Version 2.0.

The logo provided by bunny on Freepik


~574K SLoC