Blueprint based AI performance

So I have noticed that after 40 - 60 of my ai have spawned, there is a significant performance dip. This is with using simple box instanced meshes so I know it’s just the blueprints effecting performance. Is there a way to improve performance? What should I look for in my blueprints that could be causing the slowdown?

First of all, you need to organise your AI actions and if possible, avoid making calculations at every event tick. Also there are settings available regarding path finding (how frequently should the path be checked and recalculated etc.). Finally, using low poly characters with shared animations would help reduce GPU memory and processor usage.

Ok so how would I avoid doing the calculations every tick? I guess I could use delays or timers. Last time I tried using a timer instead of event tick, bad things happened lol, so I already know that that won’t work.

Timers and multigates are very helpful. How did you wire your timers?

I have the ai running off of an event tick initially and then it uses a switch to determine the ai state. I’m thinking that casting might be causing the issue. Isn’t there an alternate way of casting?

Use behavior trees. it will allow the ai to run a task an not update the logic until it is completed. Avoid tick as much as you possibly can. My AI does not use it at all. It should be completely event driven or timer based (services for this) .

I have a hard time understanding behavior trees since there seems to be a lack of tutorials, and every time I try using logic that works fine in blueprint, it does not work the same in tasks and services with behavior trees.
I did stop using the event tick and started using timers. At this point it seems like the very existence of the actor causes an fps drop. I’ll try messing around with turning things off completely to see where it happens.

It seems like I fixed it using timers and adjusting the rates on everything. Here’s 120 ai running at around 80 fps