ABSTRACT

Behavior trees are an architecture for controlling nonplayer characters (NPCs) based on a hierarchical graph of tasks, where each task is either an atomic, a simple behavior an agent can directly perform, or a composite, a behavior performed by a lower level behavior tree of arbitrary complexity. Behavior trees are customizable because behaviors are decomposed into smaller components, which can be individually changed or parameterized. Three of the pitfalls in behavior tree design are: adding too many kinds of classes to the decision architecture of behavior tree; building a complete programming language into behavior tree before they need it, and forcing all communication to route through the blackboard as a point of principle, rather than when required by the needs of the application at hand. This chapter develops specific recommendations on how to create a system which avoids the pitfalls, especially if licensing or interoperability concerns prevent us from building on existing commercial or open-source solutions.