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?