The AI needs to build more tech libraries and use more spells. It needs to 'zero out' it's resource piles through trading or building.
I was fighting Resoln the other day, and I noticed that the faction had stockpiled like 2000 Gildar. They had 50+ Power level above me. Eventually, they decided to declare war. I crushed Resoln utterly. The only small stumbling block I had was that they HAD purchased a demon. Individually it would have caused trouble, but I bombed it with Arcane Arrows and killed it utterly.
Really?
RESOURCE MANAGEMENT
If the AI has Gildar and Materials, it should be building basic troops. War Staff + Leather
If the AI has Gildar and no Materials, it needs to invest in more workshops.
I think the AI does this already, but it should research Magical Weapons/Equipment to drain it's excess Gildar.
If the AI has too many resources, and nothing to do with it, they should start building outposts to take advantage of empty queues. That, or forging alliances and paying other people to do it's bidding.
MILITARY STRATEGY
-Maintain large army groups! The AI needs to have at least one 'main stack' that is composed of the strongest units it can muster when at war.
-if the AI is at war, and there are units at it's borders, the AI should use casters and teleport to 'gather up' the strongest stack it can, and try to crush enemy formations.
-Maintain parity with neighbors! If the AI is running caravans, it can see the cities of other players. The AI should try to maintain an army of equal (preferably better!) size and combat rating. It can be a champion type army, a mundane army, a summon army, whatever. The AI should calculate every player's total combat rating and try to maintain a force depending on it's disposition. (Of course, combat rating calculations need to change as well)
Military/Conquerer AIs want a force 50% larger than the largest neighbor by default. If a 'conqueror/Hitler' type of player has appeared and is waging aggressive war, then all AIs will want a 50% larger force than the conqueror
Peaceful AIs want a force 25% larger
AIs that have a good relationship with the largest neighbor can maintain an equal force.
-The AI needs to identify where and when a 'climactic battle' will occur, IE when each player's largest armies will clash. Preferably the AI will try to force this battle if it is stronger. During this 'climactic battle' the AI should cast it's strongest spells with no regards to mana. Before the 'climactic battle' the AI should try to use all of it's enchantments, namely cheap stuff like Arcane weapon.
-The AI's military units should ALWAYS STAY CLOSE TO EACH OTHER! It should have one 'main force' or 'flagship stack'. If it needs to garrison remote territories, it should create separate units for that purpose.
-A clever, devious AI might have multiple strong stacks for the purpose of 'forcing choices'. It might attack two cities at once, or run through the countryside destroying improvements.
-If the AI has access to strategic combat spells, like volcano or column of fire, it should use them on the enemy's largest stack.
-If the AI is weaker, it should send fast units deep into enemy territory to attack resource nodes. At least 25% of the AI's military should have a movespeed >2, preferably as high as it can go.
-The AI should use Terrain spells to create chokepoints between it, and any neighbors. The AI won't do this if it is allied to a neighbor. It should pre-emptively close off paths to vulnerable cities.
-An AI on the attack should use Terrain spells to create a direct path to target enemy cities.
DIPLOMATIC STRATEGY
-Unless it is the strongest faction, or a homicidal maniac AIs should try to band together with 'like' factions.
-The AI should feel free to 'gang-bang' smaller factions when it has the resources to pay off other factions to attack.
HERO/SOVEREIGN STRATEGY
-The AI should specialize it's Heroes. There are three types, CASTER, COMBAT and CHARISMA. How many it has of each type depends on the sovereign and faction.
-AIs with many caster heroes should focus on getting tactical spells, and stuff like the fire books. Caster heroes should ONLY have Int raised, and nothing else.
-The primary trait of combat heroes is Strength. An AI with a lot of combat heroes wants magical equipment and lots of gildar to buy it.
-The AI should level up CHARISMA heroes in combat, and then leave them in a city when they are level 5 or so.
CITY STRATEGY
- The AI should have separate, specialized cities focusing on TECH, MAGIC TECH, and GILDAR advancement. What city receives what upgrades is based on nearby resources.
-The AI needs to build MORE TECH buildings. Tech is the most vital thing in this game. Without tech, magical spells are very limited, and there is nothing to spend resources on. If the AI has a glut of resources or mana, it should focus on building technology fullstop.
-Build queues should never be idle! That is, unless the AI is running out of money/resources.
VICTORY STRATEGY
-Conquerer/Evil AIs should aggressively attack smaller factions. They should declare war once they've moved their forces in position, NOT before. They should make alliances of convenience and not be shy about backstabbing and absorbing weaker allies.
-Peaceful AIs should either focus on creating and maintaining alliances, and trying to win through an Alliance victory. They should strengthen 'friends' and weaken 'enemies'
-The strongest faction in an Alliance should be a 'peacekeeper'. If there are no more potential allies, they should move the alliance in the direction of isolating and destroying other factions.
-Weaker members of an Alliance should not be shy about gifting resources and units to a stronger ally if they are not immediately threatened by other neighbors.
-Neutral AIs maintain alliances to keep security and maintain a 'balance of power'. They try to win the game through magic or quest victory.
That's all I can think of for now.