Idea · Sep 7, 2026
Behavior Tree Lab
Students build a browser-based behavior tree editor and animated runtime debugger for game AI, learning how NPCs reason by constructing the reasoning system from scratch.
What it would do
Behavior Tree Lab is a multi-week web capstone where students implement a complete behavior tree engine: node types (sequence, selector, decorator, action leaf), a JSON schema for tree definitions, and an animated runtime that highlights which node is currently being evaluated, why it succeeded or failed, and which world-state flags drove the decision. Students design a game scenario (a guard patrol, a monster hunt), author their tree in a visual drag-and-drop editor, and watch it execute against a live 2D canvas game board. A 'sabotage mode' lets teams inject adversarial world-state mid-run to find holes in their tree's logic. JSON import/export lets teams share and critique each other's designs.
Key features
- Visual drag-and-drop behavior tree editor with a node type palette
- Animated runtime with per-node success/failure badges and world-state inspector
- JSON import/export for sharing and peer-critiquing tree designs
- Sabotage mode: inject arbitrary world-state during a live run to stress-test the tree
- Mini 2D canvas game board showing the NPC acting on tree decisions in real time