Expand description
§beet_flow
Beet Flow is an ECS control flow library, built with Bevy Observers. Being ECS first gives Beet a high level of flexibility and modularity.
Currently implemented paradigms:
- Behavior Trees
- Long Running
- State Machines
- Utility AI
- LLM Sentence Similarity
- Reinforcement Learning
§Hello World
A demonstration of a Sequence control flow common in behavior trees
Using BeetDebugPlugin
will log the name of each action as it is triggered.
use bevy::prelude::*;
use beet_flow::prelude::*;
let mut app = App::new();
app
.add_plugins((
BeetFlowPlugin::default(),
BeetDebugPlugin::default()
))
.world_mut()
.spawn((
Name::new("My Behavior"),
Sequence
))
.with_child((
Name::new("Hello"),
ReturnWith(RunResult::Success),
))
.with_child((
Name::new("World"),
ReturnWith(RunResult::Success),
))
.trigger(OnRun::local());
app.world_mut().flush();
§TODO
- When we get
OnMutate
observers, they should probably replace mostOnInsert
observers we’re using
Modules§
- continue_
run - A module for long running actions. The core of long running actions in Beet is systems that filter by the Running component.
- control_
flow - The core functionality of beet_flow, this module primarily
handles routing
OnRun
andOnResult
between eachActionEntity
and any correspondingActionObserver
. - control_
flow_ actions - A collection of built-in actions for controlling the flow of a tree. If you think that a missing action should be built-in, please open an issue.
- prelude
- Include the kitchen sink for beet_flow.
- tree
- Some generic tree structures and common operations, currently only used for testing the shape of entity trees.
Structs§
- Beet
Flow Plugin - All plugins required for a beet_flow application. The primary role that this plugin plays is as a kind of observer router, ensuring the OnRun and OnResult events are propagated correctly.
Enums§
- Action
Tag - Actions can take many forms, these tags help categorize them. The convention is to add these in a list just after the description of the action, and before the example: