I like forts as a concept.
Forts in the game as implemented suck. (they should be at least +50% def)
The AI does not normally use forts as they are now.
There are at least 2 aspects to the AI use of forts:
1. The AI must build forts competently
2. The AI must man the forts once they are built
The first part can be accomplished with some simple XML changes.
The AI builds everything based upon yields, and thus giving Forts a yield, particularly a food yeild, will encourage the AI to use them. To discourage fort spam even further, the bonus given for a fort should be lower than that of other improvements except under certain cercumstances.
Limiting forts to hills, allowing forts in forrests, and giving a commerce bonus next to rivers all encourage good fort placement.
With a couple of civics or techs that grant a +1 food or +1 Production modifier, the AI will happily build forts on marginal hills like desert, and tundra, and sometimes even plains and grassland depending on the needs of the AI, but only when the AI is running the appropriate civics. I've used Conquest and military state myself, and found that the civs that favor those civics will build a couple of forts here and there, and civs that don't like those civics won't tend to build forts at all.
The Ai also loves to get tradable resources, and if one places sentry towers on the map, and/or has sentry towers appear with high probability in fort improvments, then the AI will happily build forts to harvest this bonus. The AI loves happiness and health bonuses the most.
With some a yeild as small as +1 F and the other settings I've mentioned, the AI will like to build forts on hills, particularly forrested hills next to rivers, which also happen to give the forts the best defensive chances.
So, as far as the first part of using forts goes, I think it's not too hard to get reasonable results from the AI.
The second part, getting the AI to man the forts, is more difficult.
Once you have a fort built, there is no AI mission to man a fort, UNLESS the fort also harvests a BONUS resource. Then you can use the AI_GUARDBONUS mission.
As Sureshot, and likely others know, if you give +1happy to sentry towers and allow forts to harvest sentry tower bonuses, then the AI will man forts to protect the sentry tower.
With 1 or 2 minor edits to the SDK, it would be possible to do something better:
First, a new mission AI_GUARD_FORT mission could be added and given an appropriate weight. this is probably the best and cleanest way to go.
Or...a simple change to the AI_BonusValue method would allow fort improvements, reguardless of the presence of BONUSES or not to be given a good chance of being chosesn when the AI is selecting a plot to guard.
One last thing you need to consider for such an AI change is that the AI makes fairly limited amounts of RESERVE troops, exept for mages and priests. Only Reserve troops can be given the GUARD mission as things stand now, and unless leaderhead XML is edited to encourage more RESERVE troops, then forts (and other bonuses in general) can have a tendancy to be guarded by mages and priests.
I'd be happy to make these changes myself, but I have a hunch that the required methods have been edited from the standard SDK.
The proper use of forts would be more exciting in conjunction with Blake's improved economies and worker functionality...as they result in better cities, and larger, more advance armies from the AI.