Introduction
Artificial intelligence (AI) is a growing field in technology that is becoming more
important as time goes on. One common application of AI is for video games to allow players to
have an enemy to face in cases where another player is infeasible, unavailable, and/or unsuitable.
The complexity of the AI can vary depending on the type of game. Simple AI’s can be created
for games such as Tic-Tac-Toe while more advanced AI is required for complex games such as
chess. As AI grows in complexity, one of the common issues is the ballooning of code due to
repetition. An example can be seen in a simple 2-D shooter-type game where enemies may
behave differently given their environment, yet they all share common actions such as walking
and/or shooting. For a few types of enemies, repetition may not be a significant issue but when a
large amount of different behaviors are needed, common code for simply walking and/or
shooting is repeated for each of these behaviors. One design technique that mitigates this issue is
behavior trees. Behavior trees allow for the creation of complex behaviors through modularity
while also minimizing the repetition of code. One of the goals of this project is to explore the
application and effectiveness of behavior trees for the development of AI in video games.
The main motivation for this project is to explore game development with the
programming language C++. The language of choice is the result of some research on what
languages are being used in the game development area, and C++ was mentioned as a common
language. The library of choice is SDL 2 and the main reasoning behind this decision was due to
its ease of use. SDL and another library called SFML were two common libraries mentioned
during research and SDL was chosen mainly due to its widespread adoption within the game