Behavior Trees
Unity implementation of basic behavior trees and extensions such as utility and external trees.
It also provides a visual interface for editing the behavior trees.
This project was developed as part of the Cognitive Architectures research line from the Hub for Artificial Intelligence and Cognitive Architectures (H.IAAC) of the State University of Campinas (UNICAMP). See more projects from the group here.
Repository Structure
BehaviorTrees: Unity project with the package
Requirements
Unity
Installation / Usage
Installation
Open the
Package ManagerClick the add + button in the status bar, select “
Add Package from git URL...”Enter the url:
https://github.com/H-IAAC/BehaviorTrees.git?path=BehaviorTrees
Usage
Create a new
Behavior Treein “CreateBehavior TreeBehavior Tree”Double click for open the editor.
Add the nodes and connect to the root.
Assign the tree to run on a object with the
Behavior Tree Runnercomponent.
Citation
@software{my_citation,
author = {Cardoso do Nascimento, Elton and Dornhofer Paro Costa, Paula},
doi = {10.5281/zenodo.19411137},
title = {Behavior Trees},
url = {https://github.com/H-IAAC/BehaviorTrees}
}
References
Basic implementation:
[1] M. Dawe, S. Gargolinski, L. Dicken, T. Humphreys, and D. Mark, “Behavior Selection Algorithms,” in Game AI Pro 360 (S. Rabin, ed.), pp. 1–14, CRC Press, 1 ed., Sept. 2019
[2] Why Memory Nodes is a Bad Idea in Behavior Trees (intro to BTs part 5B), (Jan. 07, 2022). Accessed: Sep. 14, 2023. [Online Video]. Available: https://www.youtube.com/watch?v=W7p34qhBux8
[3] Unity | Create Behaviour Trees using UI Builder, GraphView, and Scriptable Objects [AI #11], (May 28, 2021). Accessed: Sep. 14, 2023. [Online Video]. Available: https://www.youtube.com/watch?v=nKpM98I7PeM
[4] Behaviour Tree Editor with UI Builder - Part2 [AI #12], (Jun. 18, 2021). Accessed: Sep. 14, 2023. [Online Video]. Available: https://www.youtube.com/watch?v=jhB_GFgS6S0
[5] UNITY DIALOGUE GRAPH TUTORIAL - Variables and Search Window, (Mar. 18, 2020). Accessed: Sep. 14, 2023. [Online Video]. Available: https://www.youtube.com/watch?v=F4cTWOxMjMY
Decision Behavior Trees:
[5] B. Merrill, “Building Utility Decisions into Your Existing Behavior Tree”.
[6] Utility Behavior Trees (intro to BTs part 12), (Nov. 16, 2021). Accessed: Sep. 14, 2023. [Online Video]. Available: https://www.youtube.com/watch?v=ju4GY1gtP8s
External Trees and Behavior tags:
[7] Martin Cerny, Tomas Plch, Matej Marko, Petr Ondracek, and Cyril Brom, “Smart Areas - A Modular Approach to Simulation of Daily Life in an Open World Video Game:,” in Proceedings of the 6th International Conference on Agents and Artificial Intelligence, (ESEO, Angers, Loire Valley, France), pp. 703–708, SCITEPRESS - Science and and Technology Publications, 2014.
[8] Free Range AI: Creating Compelling Characters for Open World Games, (Mar. 12, 2017). Accessed: Sep. 14, 2023. [Online Video]. Available: https://www.youtube.com/watch?v=jDCFMITrtHc
Acknowledgements
Project supported by the brazilian Ministry of Science, Technology and Innovations, with resources from Law No. 8,248, of October 23, 1991