Unreal engine 4 AI System too bizarre, it used to be better before.

The AI system they have developed is aimed at experienced AI programmers with familiarity to the AI dev’s day to day jargon.
It’s expected from you to have a dedicated AI programmer working on top of it to have decent AI, for small teams or lone wolves this whole thing feels like a nightmare.

I basically agree with you Bruno, but look at the Twitch AI streams, even the devs struggle sometimes, that says a lot about usability. Maybe its the right way but its way to abstract and complex when i last tried it.

Streams are streams, they only last one or two hours. You can’t judge anything on that.

Hey

I think this will help many peoples to understand better the jargon.

https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/index.html

But if you want something cool, you can purchase the UAIS in the Marketplace.

It has waypoints system, aggrorange, distance to attack and time limit to chasing the player. Our enemy bot returns to your waypoint to patrol or keep guard If it reaches the defined maximum time limit. It uses Navmesh plus Patrol route using defined waypoints.

No need to apology (;.

In anycase. I have nothing against using something like FSM or GOAP inside BT (or just using them alone).
What I’m against, is to trying to bend BT using decorators to behave like FSM or GOAP. It’s just not going to end up well in long run. BT and FSM are like opposite spectrum of AI, and the only thing in common is that they are used to drive AI actions.

FSM operates on strictly defined behaviors, if you did not predicted some action can be taken, it will not be taken. Period.
BT is bit fuzzy. Just because you did not predicted some action might not take place, doesn’t mean AI will not take it. Conditions might align in such way that AI will take unpredicted actions.

BTs are perfect choice for naturally behaving agents. Like in RPG where you dont really want strict predictability, in that case some controlled chaos would be preffered. Even if it sometimes lead to funny or outragous behaviors it will be still be more appreciated, than static predictable AI.

My take on it would yes, using multiple BTs and subtrees, for more general behaviors and high level decision making.

Then using FSM, GOAP, Actions (GameplayTasks) as leaf nodes in BTs used to drive very strict behaviors. Just becuase something is named task, doesn’t mean it have to end in 1 second. The point of BT is that it can enter task and stay in it for few minutes and then return to normal behaviour.

Then for a question. Why odes UE4 comes with BTs by default ? Well creating general GOAP solution would be more PITA than generic BTs.
FSM could be probabaly created as generic solution, but then it would kill main advantage of FSM which relative simplicity.

BTs are just well rounded generic solution.

For everyone. You should check GameplayTasks, there is little to nothing of examples and documentations, but from what I understrand these can be used to run “async” (not really async, they just behave like that), tasks, which can be used to construct AI actions in more generic way without using BTs.

Yeah depending on your use case I think that’s reasonable. I’d agree with iniside that if you are trying to force which child to execute based on an enum value, you are kind of fighting against the inherent design of behavior trees, which is to choose behaviour dynamically with a left-to-right priority.
I think if your character behavior fits into a set of predefined states, you would be better off choosing which BT to run based on that enum, rather than trying to control it within a BT.

I don’t have much experience with BTs, but I do feel like they are not suited to every kind of AI and they shouldn’t necessarily be used just because they’re the main AI tool provided by the engine.

I feel the same way as Neongho**, it would be soooo much easier if everything was handled inside the AI Controller instead of bouncing back and forth between all these different pieces. I have 10 windows open trying to figure out what is going on. **

I love the behavior trees approach to AI, is amazing, but yes in the begging is a f********* hell :slight_smile:

In my opinion the main problem is the nomenclature, all names are ridiculous and confusing.