Logo: Behavior Trees

Behavior Trees

Communautéit
kevinpbuckley
behavior-trees

Create, inspect, and edit Behavior Tree and Blackboard assets — composites, tasks, decorators, services, node properties, blackboard key bindings, key CRUD and metadata, tree round-trips and validation (BehaviorTreeService + BlackboardService). Use when the user asks to build a Behavior Tree, add BT nodes or decorators, bind blackboard keys, author a blackboard, or validate/repair a BT asset.

Add to TypingMind

Iwwersiicht

Editeurkevinpbuckley
RepositoryVibeUE
Skill-Nummbehavior-trees
Stären
735
Forks
161
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    kevinpbuckley huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Behavior Trees an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/kevinpbuckley/VibeUE/tree/master/Content/Skills/behavior-trees
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kevinpbuckley/VibeUE.git /tmp/VibeUE
mkdir -p .claude/skills
cp -r /tmp/VibeUE/Content/Skills/behavior-trees .claude/skills/behavior-trees
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Behavior Trees an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Behavior Trees automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Behavior Trees net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

🧠 Brains complement: IF an unreal-engine-skills-manager tool (external MCP) exists in this session, call it with {action: "load", skill: "ai-and-navigation"} for UE domain knowledge on Behavior Trees — architecture, node semantics, best practices. If no such tool is available, skip this line entirely and proceed with this skill alone — do NOT attempt the call.

Behavior Trees Skill

Two services, reachable from Python (unreal.BehaviorTreeService.*, unreal.BlackboardService.*) and as AICallable tools:

BlackboardService     → UBlackboardData assets: create, key CRUD, metadata, re-parenting
BehaviorTreeService   → UBehaviorTree assets: structure, sub-nodes, properties, build, validate

Discover exact signatures with discover_python_class('unreal.BehaviorTreeService') — this skill teaches the concepts and the gotchas, not the call shapes.

The golden workflow

python
import unreal
BT = unreal.BehaviorTreeService
BB = unreal.BlackboardService

# 1. Blackboard first — key bindings resolve against the TREE'S board, so assign it at creation.
BB.create_blackboard("/Game/AI/BB_Guard")
BB.add_blackboard_key("/Game/AI/BB_Guard", "TargetActor", "Object")
BB.set_blackboard_key_object_class("/Game/AI/BB_Guard", "TargetActor", "/Script/Engine.Actor")

# 2. Tree on that board.
BT.create_behavior_tree("/Game/AI/BT_Guard", "/Game/AI/BB_Guard")

# 3. Structure. Every mutator returns the new node's PATH (or "ERROR: ...").
sel = BT.add_node("/Game/AI/BT_Guard", "Root", "BTComposite_Selector")          # Root/Selector[0]
seq = BT.add_node("/Game/AI/BT_Guard", sel, "BTComposite_Sequence")
wait = BT.add_node("/Game/AI/BT_Guard", seq, "BTTask_Wait")

# 4. Properties and bindings.
BT.set_node_property_value("/Game/AI/BT_Guard", wait, "WaitTime", '(DefaultValue=3.5,Key="")')
dec = BT.add_decorator("/Game/AI/BT_Guard", seq, "BTDecorator_Blackboard")
BT.set_node_blackboard_key("/Game/AI/BT_Guard", dec, "BlackboardKey", "TargetActor")

# 5. Verify.
print(BT.validate_tree("/Game/AI/BT_Guard"))   # [] == clean
print(BT.get_tree("/Game/AI/BT_Guard"))        # whole tree as JSON

Every mutator saves the asset itself — there is no separate "commit" step to forget. compile_and_save exists for re-running layout + save on a tree edited some other way.

Node paths — the addressing scheme

  • Root/Selector[0]/Sequence[1]/Wait[0] — segments are node TITLES with an index among same-named siblings. Root is a keyword (the graph root), not a title.
  • Sub-nodes: <owner path>/@decorator[n] / <owner path>/@service[n] — by slot, in order.
  • Paths are positional, not identities. Inserting/removing a sibling renumbers later ones; renaming a node changes its segment. Hold the node's guid (from GetTree/GetNodeInfo) across edits, and re-read GetTree after a rename. set_node_name refuses names the grammar cannot express (/, leading @, trailing [n]) — on both the direct route and via the NodeName property.

Things that are not obvious and will bite you

  • WaitTime and friends are structs. In UE 5.8 many numeric BT properties are FValueOrBBKey_*: pass '(DefaultValue=3.5,Key="")', not '3.5'. Read the current value first (get_node_property_value) and mirror its shape.
  • Blackboard key selectors are not values. Always set_node_blackboard_key, never set_node_property_value, for anything get_node_property_names flags bIsBlackboardKeySelector. The service validates the key's TYPE against the selector's filter up front — a mistyped binding would otherwise resolve, read back fine, and be silently cleared by the engine on the next save.
  • SimpleParallel has two fixed slots, not a child list: slot 0 = main task (tasks only), slot 1 = background branch. The engine refills an empty background slot with a Wait task on every save, so the background branch can only ever be REPLACED (add_node(parallel, cls, 1)), never removed or moved away.
  • Root-level decorators go on the top composite (the node under Root), not on Root itself — add_decorator(asset, "Root/Selector", ...) is the correct call and the refusal message on Root says so.
  • set_node_property_value verifies after the save. ValueAfterWrite is re-read from the asset, not echoed; if the engine rewrote the value at save time the call reports failure and tells you what is actually on disk. Trust it.
  • Injected nodes (from RunBehavior subtrees) are read-only everywhere. Edit the subtree asset.
  • Comments: set_node_comment writes the graph comment bubble — annotation only, survives GetTree→BuildTree round-trips. Use it to record WHY a subtree exists.

Round-trips, repair, safety

  • get_tree → edit the JSON → build_tree(target, json, bReplaceExisting) replays it through the ordinary mutators. One save per node/property — fine for tens of nodes, not a bulk-import path for thousands. With bReplaceExisting=true the result's PreReplaceSnapshot holds the target's previous tree; if the build fails midway, feed that snapshot back to build_tree to restore.
  • Composite (logic-operator) decorators cannot be recreated by BuildTree (editor-only sub-graphs; reported per-node) — author those in the BT editor.
  • Writes are refused while PIE runs, while an editor is open on the asset, and when the commit would destroy or crash on the runtime tree (sparse graph / instance-less root). Refusals name the mechanism and the fix; read them.
  • repair_graph_from_runtime_tree rebuilds a sparse editor graph from the runtime tree — explicit, never implicit. validate_tree is the read-only diagnostic sweep (orphans, broken key bindings at any nesting depth, empty composites, misplaced sub-nodes).

Blackboards beyond key CRUD

  • set_blackboard_key_instance_synced, set_blackboard_key_metadata (category + description), set_blackboard_parent (cycle- and shadowing-checked) — all post-creation editable.
  • find_blackboard_key_references(board, key) lists every BT selector bound to a key, formatted <btPath>:<node>.<property> — run it BEFORE remove_blackboard_key or rename_blackboard_key; rename returns the same list after the fact (those bindings broke).
  • SelfActor on a parent-less board is engine-persistent and cannot be removed.
  • Blueprint node classes (BTT_*, BTD_*, BTS_*) are created with the blueprints skill (parent class BTTask_BlueprintBase etc.); get_available_node_types lists them once they exist, and add_node resolves them by short name, _C name, or full object path.

Heefeg gestallte Froen

Wat mécht de KI-Skill Behavior Trees?

Create, inspect, and edit Behavior Tree and Blackboard assets — composites, tasks, decorators, services, node properties, blackboard key bindings, key CRUD and metadata, tree round-trips and validation (BehaviorTreeService + BlackboardService). Use when the user asks to build a Behavior Tree, add BT nodes or decorators, bind blackboard keys, author a blackboard, or validate/repair a BT asset.

Firwat Behavior Trees op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Behavior Trees besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Behavior Trees an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/kevinpbuckley/VibeUE/tree/master/Content/Skills/behavior-trees an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Behavior Trees benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Behavior Trees benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Behavior Trees domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Behavior Trees gratis?

Jo. kevinpbuckley huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇