Document Type


Lead Author Type

CIS Masters Student


Dr. D. Robert Adams,

Embargo Period



Artificial Intelligence, AI, Behavior Trees, Decision-Making, Modularity, Code Repetition


Artificial intelligence (AI) is a growing field of interest in computer science and is becoming increasingly important. There are numerous applications of AI with one of the most common ones being in video games. AI in video games often requires complex behavior for non-player characters (agents) within the game (e.g., enemies). One challenge for video game developers is to provide robust agent behavior while reducing duplication of code. Agent behavior often consists of a choice between independent actions ("should I run or shoot?"), but good design principles dictate that the code for those actions should not be duplicated in each agent. As more behaviors and actions are introduced, more code for common actions are repeated in each one, thus ballooning the code. One AI technique to combat this problem is behavior trees. Behavior trees allow behaviors to be composed from independent actions, while reducing the repetition of code. Modularity is also another benefit of behavior trees as behaviors can be created through different combinations of independent actions. The purpose of this project is to explore the concept of behavior trees and determine its effectiveness to the repetition issue. A simple space-shooter type game is used to show the application of behavior trees and how effective it is when used to create different types of behaviors for the AI. The result demonstrates that behavior trees can be used to not only create different types of complex behaviors for the AI, but also reduce the repetition of code through reusability and modularity.