Much more is being done in this area and a number of AI scripts should ship with the game. There's even a customizable AI where you can set priorities and paths for the computer to follow. The AI for Age of Kings should also be able to throw in the towel as well. An AI that knows when to surrender is okay in my book. There are a few things to note here however.
Gatehouses can hold ten units.
The player who owns it can open and close the gate at will. Be warned, however, as the closing of the gate is very dangerous. You get the idea. You will be able to construct wooden walls right away. This will deter very early blitz tactics against rival civilizations.