Article

Why Your AI Needs Hierarchical Behaviors

Alex J. Champandard on June 4, 2007

Modular behaviors provide the basic building blocks of any AI engine. However, it’s usually necessary to combine lower-level behaviors into more complex ones. Using a hierarchy is the most obvious next step, and the most popular in the games industry.

So why does a hierarchy offer good ways of structuring AI logic? There are a few reasons:

  • It’s an intuitive way to think about organizing behaviors.

  • The dependencies between the behaviors in a hierarchy are obvious.

  • Many types of behaviors can be expressed as a hierarchy.

  • It’s an effective way to understand the actor’s current state of mind.

Having a hierarchy in your game AI is noticeable through the following factors:

  1. The brain of your actors can be structured in layers.

  2. Behaviors are organized as file folders on disk.

  3. Designers can easily make smarter behaviors by adding elements to existing ones.

  4. Common patterns are used to assemble complex behaviors from simpler ones.

Taken together, these advantages prove to be rather effective when developing AI. Hierarchies make the process of creating complex AI much more manageable.

Discussion 0 Comments

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!