This second part of Empire takes into account the battle element. In the first part it was about single player exploration. Now its about multi player battling and conquering cities. There are three parts of the AI for battling. The three are scouting, defending, and attacking.
I am gonna modify the exploration AI to not travel over water. One storm on the sea could wreck my whole army. This happened in the exploration competition. So I am still gonna use similar code, where the army units will move to the closest hidden tile. Although if the unit is on a water tile, it will move to get out of the water tiles.
The second part, defend, is about defending the city so that other players won't conquer my cities. This AI is pretty basic. The AI will just circle around the city. This way if an enemy is trying to conquer my cities, my defending units will try to kill the attackers.
The third part is attacking either other cities or enemies. These units will group outside the city, on land. This way the units won't get destroyed by the storm on the seas. Then when there is a revealed city that my AI doesn't own, the attackers will travel to the city and try to take it over.
When my AI combines these three techniques. The AI should be pretty decent at Empire.