Blueshell is a Promise-based Behavior Tree implementation using modern ES6 syntax.
Node Types
Actions (aka Tasks or Execution Nodes)
Composites (aka Control Flow Nodes)
Decorators
Decorators intercept and can modify the event sent to or the result from the child.
-
Not
- Returns 'FAILURE' when the child returns 'SUCCESS', and vice-versa
-
RepeatWhen
- Repeats the child when an evaluation function returns true.
-
RepeatOnResult
- Repeats the child if it returns the specified status.
-
ResultSwap
- Allows you to swap one result of a child node for another.
- For example, you can use this to mask
FAILURE
as SUCCESS
.
Base Classes
-
Base
-
Composite
- The base class for all nodes which have children.
-
Decorator
- The base class for decorators.
- Can only have one child.
Inspiration and Further Reading
The following are sources used when designing this library
Unread
Name
Blueshell
is named for a Skroderider from the novel A Fire Upon the Deep
by Vernor Vinge. Skroderiders are intelligent plants (trees) that use mechanical constructs to give them locomotion
and short-term memory.
In other words, Blueshell
is an intelligent tree. Or a tree with behavior. Get it?