In theory, the tactic is simple: towers, lots and lots of towers. However, there is a certain order in which to expand:
At this point, you feel pretty secure, but in another 5-10 minutes they will come at you again with knights, ogres, and magic units, plus you are about to run out of gold. The key is to expand and keep your enemies from expanding. Find every gold mine on the map and literally surround them with guard towers.
The AI is too stupid to attack the towers, they will just send waves of peasants to their deaths trying to get to the barricaded gold mines. In the meantime, build a new base around a gold mine and tap into it. In the classic built-in map “Plains of Snow” you have to worry about the computers chopping the wood in the center to get to the gold mines. Again, when I said literally surround it with towers, I meant literally block off all access. Walling in enemies inside their own bases is also effective for keeping them from expanding but be sure to leave a few ground troops there in case they have magic or catapults. Building all those towers may seem expensive but it’s a small price to pay to completely cut off all 7 computers from their gold supply. The second the computer runs out of resources, you’ve already won.