https://github.com/tbillington/greenery
Simple behavior trees
https://github.com/tbillington/greenery
ai behavior-tree bt deno typescript
Last synced: 6 months ago
JSON representation
Simple behavior trees
- Host: GitHub
- URL: https://github.com/tbillington/greenery
- Owner: tbillington
- Created: 2021-01-31T01:13:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-31T02:23:57.000Z (over 4 years ago)
- Last Synced: 2025-02-15T22:29:57.282Z (8 months ago)
- Topics: ai, behavior-tree, bt, deno, typescript
- Language: TypeScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Greenery 🌳
Simple behavior trees.
```javascript
const tree = select(
endSimulation,
sequence(
moveInRange,
select(
shootEnemy,
reload
)
)
)const state = {
player: { x: 5, bullets: 3 },
enemy: { x: 10, health: 10 },
done: false
}while (!state.done) {
tree(state)
}
```