Theres a trigger effect that will set the difficulty, you can put it too hard or titan, so that no matter what difficulty the player sets, it will revert to Hard or Titan, and thus the opponent will pose a challenge.
You can also give the computer player extra resources through player data or a handicap, which would be giving him faster gathering rates (I believe there was an effect for this, but I haven't used it since 2003-2004 in the days of my newbieness) You can make a looping trigger that gives him a constant income of resources.
As for the AI Function trigger. I have no experience with that trigger, as I haven't been using AI in scenarios since my "newbieness". But I don't think it's necessary for the AI to pose a challenge.
Cavuy | Writer, Graphic & Web Designer
ex-Modder and Scenario Designer | Legacy
Member since May 5th, 2003