Behavior Trees: AI
- Siddharth Gupta
- Sep 23, 2017
- 2 min read
Introduction
Demands for immersive game play and intelligent interactions with non-player characters put new focus on the shortcomings of current techniques used by game developers to make AI in games. Behavior Trees, the dominating technique used by the game development industry currently, is showing its age. It is starting to fail as game developers wants more complex AI that features emergent behavior and realistic decision-making under incomplete information. Consequently, superior AI technologies such as Utility AI, already used for some of the best AIs in games, are increasingly replacing Behavior Trees, and introducing a new era of better and more advanced game AI
Behavior Trees
The finite state machines were increasingly popular back in the days when game industry was budding in the field of game AI. Although as the demand of high performance graphics games began to grew, FSM were a little too slow to process thousands even millions of states in a game. That is the time when Damian Isla outlined the behavior trees concept at the GDC talk, 2005.
The idea of hierarchical organisation of tasks, lead to the idea of organizing tasks in tree-like structures, a.k.a. Behavior Trees.
Project
My school, Digipen has this course of Artificial Intelligence in Games which I am currently enrolled in. The subject had its first project on Behavior trees. The task was to create 10 individual nodes which are unique in there own way. We had to also create 4 unique behavior trees using a behavior tree editor supplied to us. This project had been a cornerstone to my understanding of Behavior trees down till the implementation level. Although the technique of Behavior Trees is fading and Utility AI is taking over it gradually, Behavior Trees are still widely used in many hit games.
Here's a screenshot of the behavior I implemented for this project:

The nodes I implemented for the project:
-Increase Scale
- Decrease Scale
-Change Color
-IsPlayerNear
-Turn
As you can see the scaled models and colored models in the screenshot. The black model is the user controlled player which tries to infect other models which react by changing color or scale. This is very simplistic project but the deep foundations of behavior trees is understood completely.
Comments