# What is the best way to have a large number of ai?

**URL:** <https://forums.unrealengine.com/t/what-is-the-best-way-to-have-a-large-number-of-ai/369379>\
**Category:** AI\
**Tags:** ai-navigation, Behavior-Tree, detour-crowds, unreal-engine, Blueprint, question\
**Created:** [September 4, 2016, 9:19pm UTC](https://forums.unrealengine.com/t/what-is-the-best-way-to-have-a-large-number-of-ai/369379 "2016-09-04T21:19:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hafgren](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hafgren](https://forums.unrealengine.com/u/Hafgren)\
**Post date:** [September 4, 2016, 9:19pm UTC](https://forums.unrealengine.com/t/what-is-the-best-way-to-have-a-large-number-of-ai/369379/1 "2016-09-04T21:19:12Z")

</div>

I was trying to think of a way to have a large number of AI on-screen at once, but would like a second opinion. I was thinking about having the AI have more detailed Behavior trees when they are by themselves, but when close to other AI they choose one of the AI to be the leader of the group, so they use a very simple behavior tree when following the leader, would this be a good way to go about doing it? If not I would very much appreciate any help I can get.

---

<div class="post-metadata">

**Author:** ![PasteDog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PasteDog](https://forums.unrealengine.com/u/PasteDog)\
**Post date:** [September 5, 2016, 9:03am UTC](https://forums.unrealengine.com/t/what-is-the-best-way-to-have-a-large-number-of-ai/369379/2 "2016-09-05T09:03:19Z")

</div>

Hey Hafgren,

This is indeed a solid way of doing it, you will have to test a lot though because I have not seen anyone do it in Unreal yet 🙂  
I have done some tests myself and my frame-rate only drops when I have 150+ advanced individual AI’s running around 😛

You should take a look at this link: [https://software.intel.com/en-us/articles/designing-artificial-intelligence-for-games-part-1/](https://software.intel.com/en-us/articles/designing-artificial-intelligence-for-games-part-1/)  
There is also something described like a ‘commander’ AI leading other AI’s like you are describing.

Good luck with your project, I am looking foreward to the results!  
Elias
