Skip to content

Commit

Permalink
Revive/rewrite the blackboard documentation into BT.
Browse files Browse the repository at this point in the history
  • Loading branch information
andriyDev committed Jan 12, 2025
1 parent 023fb2e commit da96f68
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bonsai/src/bt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ use petgraph::Graph;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

/// The BT struct contains a compiled (immutable) version
/// of the behavior and a blackboard key/value storage
/// The execution state of a behavior tree, along with a "blackboard" (state
/// shared between all nodes in the tree).
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct BT<A, B> {
/// constructed behavior tree
pub state: State<A>,
/// keep the initial state
initial_behavior: Behavior<A>,
/// blackboard
/// The data storage shared by all nodes in the tree. This is generally
/// referred to as a "blackboard". State is written to and read from a
/// blackboard, allowing nodes to share state and communicate each other.
bb: B,
}

Expand Down

0 comments on commit da96f68

Please sign in to comment.