I have seen the AI use forts in an intelligent manner in many instances on hard difficulty, Including blocking my advancement into their territories with forts in mountainous regions and around key access points like constantinople. When I play the game I like to take into account the difficulty and true expense of constructing such buildings. I limit the amount of forts I build to what I think would be historically accurate for the region( considering the size of the campaign map) and to not constrict path finding.