Pitfalls of behavior trees
With reactive actions, behavior trees have shortcomings; they represent stateful logic very poorly. If statefulness needs to be preserved within a behavior tree, typically high-level conditions will dictate which branch is currently active. For instance, the noncombat and combat state of our agent isolates a lot of the behaviors that are available at any point in time.