AI performance

Hi, I’m trying to make thirty AIs that chase the character and attack him, and I was thinking about how to do it, but efficiently.
I am following these tutorials (https://www.youtube.com/watch?v=zNJEvAGiw7w) but I think there is a lot of this that I don’t need.
Can anyone shed some light on how to optimize an AI?