
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
behavior3-chief
Advanced tools
Manage and run behavior trees for your subjects in your game
Chief is full features JavaScript library for creating, maintaining and executing behavior trees.
A behaviour tree is a tree of hierarchical nodes that control the flow of decision making of an AI entity. At the extents of the tree, the leaves, are the actual commands that control the AI entity, and forming the branches are various types of utility nodes that control the AI’s walk down the trees to reach the sequences of commands best suited to the situation.
Quoted from the article
Subject is an invention of the Chief. It represents a single entity that runs a single behavior tree. It has memory for sharing data between other nodes and trees.
Chief exports single factory function to create instance of its API object.
import Chief from 'behavior3-chief'
const chief = Chief.create()
Behavior is used contain actual logic behind tree execution. Chief contains several native behaviors. New behaviors can be added easily.
Generally there is no limitation to write definition of behaviors using ES2015 (or later) specification of JavaScript language. Actually it's recommended as it was designed that way (eg. destructuring feature).
Since behavior defininitions are compiled on the fly, you need to either make sure that target environment can run such code or you can supply transpiler to Chief. Including Babel is surely overkill, luckily there is a very promising project called Bublé.
import { transform } from 'buble'
const chief = Chief.create({
transpiler(code) {
return transform(code).code
}
})
FAQs
Manage and run behavior trees for your subjects in your game
The npm package behavior3-chief receives a total of 36 weekly downloads. As such, behavior3-chief popularity was classified as not popular.
We found that behavior3-chief demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.