Creating custom AI
You can derive from the AIController class and override its virtual methods with your own logic. You can still use default logic and add only new, if you’ll keep some of virtual methods not overridden (for example, HandleUnitsBuilding method, by default it handles units production by AI, if you override it and don’t use base.HandleUnitsBuilding(), AI will stop buying new units).
To use new AI, you need to add it on the AIController prefab instead of the default one AIController component.