AI - Blueprints vs Behavior Trees

Hi everyone,

I’m still debating whether to use just normal BPs logic or go for the Behavior trees for my AI.

BPs do seem easier, but I was wondering if anyone could come up with a list of advantages and disadvantages of them.

Starting with performance – do you get any performance advantage by using Behavior trees instead of performing the logic directly in BPs?

Thanks a lot!

First off, note that Behavior Trees only dictate what to do, not how or why to do it. How and why are still defined in Blueprints. (And probably C++ though I haven’t seen how to do that yet)

I haven’t instrumented performance impact on either, so I can’t weight in on that. But in games don’t listen to any performance claims without actual hard data, people love gut instincts. In fact you should use the tool that makes you most productive until you actually find a bottleneck.

Personally I would not want to implement a behavior tree like this in blueprints. (Note that this is only a section of an AI’s behavior from this game. Click the image for a link describing the logic behind using Behavior Trees.

](Behavior trees for AI: How they work)

That’s an amazing article, I’ll have a look at it. I see why BTs seem much cleaner for complex AI.

Thanks for your help!

thanks for this the article did a good job at explain how the trees worked.

No problem!

If you’d like some info on how to actually use the Behavior Trees in Unreal 4, here’s the documentation’s quickstart guide/tutorial, and here’s a guide from the wiki.