blueshell
Advanced tools
Weekly downloads
Readme
Blueshell is a Behavior Tree implementation written in Typescript.
It is synchronous for performance - asynchronous operations can be handled by returning async operations to your framework for evaluation, these can then generate new events to drive the behavior tree.
(state, event) => boolean
) and returns SUCCESS
or FAILURE
based upon the boolean result of such function.(state, event) => void
) and always returns SUCCESS
.SUCCESS
when activated.(aka Priority or Fallback)
SUCCESS
or RUNNING
, then returns that value.FAILURE
.SUCCESS
or RUNNING
, then returns that value.FAILURE
.RUNNING
, subsequent events start at that child.FAILURE
, or RUNNING
, then returns that value.SUCCESS
, return SUCCESS
.FAILURE
, or RUNNING
, then returns that value.SUCCESS
, return SUCCESS
.RUNNING
, subsequent events start at that child.conditional
function a consequent
node, and an optional alternative
node.conditional(state, event)
returns true, will return the result of activating the consequent
node.conditional(state, event)
returns false, will return the result of activating the alternative
node, if one is provided.conditional(state, event)
returns false, will return FAILURE
if no alternative
node is provided.Decorators intercept and can modify the event sent to or the result from the child.
FAILURE
as SUCCESS
.The following are sources used when designing this library
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?
FAQs
A Behavior Tree implementation in modern Javascript
The npm package blueshell receives a total of 575 weekly downloads. As such, blueshell popularity was classified as not popular.
We found that blueshell demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.