NOTE: project is in early stages although happy to talk if you think contributing is something worth doing.
Behavior Tree is an abstraction widely used in gaming and robotics industry, it provides an easy to comprehend and extendable interface for designing complex behavior.
Buttercup aims to provide a platform for designing and running agents which can execute a complex behavior in the Web environment.
So instead of using actuators or performing actions in a game you can send emails, scrape the web, perform http requests, etc.
Quite awesome book on BTs - basis for the ongoing implementation:
Handful of papers about Behavior Trees:
- Marzinotto, Alejandro, et al. "Towards a unified behavior trees framework for robot control." 2014 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2014.
- Shoulson, Alexander, et al. "Parameterizing behavior trees." International conference on motion in games. Springer, Berlin, Heidelberg, 2011.
- Klöckner, Andreas. "Behavior trees with stateful tasks." Advances in Aerospace Guidance, Navigation and Control. Springer, Cham, 2015. 509-519.
The project is in first draft stages, so you will see greatly undertested code that will change frequently.
Please track the POC project for more details.
Here are some well known features that BTs implementations may have:
- Subtrees
- Blackboards
- Reactive Nodes
- Condition Decorator Nodes
- Parametrized Trees and Subtrees
- Stateful Nodes
After the POC we're going to have some more fun.
The most important part of the 1.0 version is getting the test coverage to 80% and a stable API.
After that, we should ask about the distributed mode, where each execution can be repeated, e.g. with at-least-once execution guarantees, so even if a node running a certain agent fails another can pick up almost at the point where the other ended and continue the execution.
This would allow to run a swarm of agents which could be orchestrated with or without a centralised source of truth with quite decent guarantees.
At the moment looking at Raft in a multi-raft variant, where agents would be partitioned and each partition would have 1 node selected as the leader but it's an early concept.
Some visions on how this project can be used and specialize in the future, mentioned in order from most probable to most adventurous:
- Pentesting: BTs allows for designing clear and auditable scenarios, where groups of agents can coordinate parts of the attack, e.g. on group hammers a given service for others to abuse the downtime in other parts of the system;
- IoT: the engine is written in Rust and will run on whatever can execute
async-await
so potentially you could design BTs on the server and broadcast those to connected devices; - Web3: fast and lean implementation could provide desired latencies for crypto use cases.
C'mon, small yet brave! :)