A worthwhile script that nonetheless has bugs. It goes to the feudal age quite rapidly, but has a slow castle. Economic management is fine, but I winced when I saw the units it made. It pumps out *cough* militia in the dark age, and doesn't attack with them. It switches to knights in the castle age, but doesn't make much else to supplement them.
Some other problems are:
"7 trebuchets must be trained for attack to begin". What will your AI do if I constantly knock down its castle? "paladin research is needed for attack to begin". So what will it do if it plays a civ that doesn't get paladins? "(defconst feudal-age-villagers-to-train 30)" I'd say you'd need less then 30 for a quicker castle. "(defconst monks-to-train 7)". Don't train monks. They are expensive, they are slow and fragile, they are slow healers, they blow.
The standard AI was able to defeat a team of four of yours. Aside from the militia, trebuchets, monks and paladins (its mainline unit) it doesn't create any different units. A player can just spam halberdiers, and take down the paladins. I like the way your AI manages its economy, but it is weak when training military.