(I hope you know that when you are in mercantilism and you have open borders with someone he gets all the trade route money in his cities, but you dont get any...)
I'm well aware of this, and have pointed this fact out in several discussions on mercantilism and trade routes in the past.
I was talking ALL THE TIME about what the AI should do, not what I should do.
So what? The same strategy works, or doesn't work, for humans and AI alike. If it isn't a good strategy for the human player (which is the perspective I've been discussing it from for simplicity's sake), it isn't good for the AI. If it makes you happier I'll explain completely in terms of AIs, but it makes it more confusing.
AI 1 switches to Mercantilism. It loses major amounts of cpt in exchange for free specialists. It also closes borders with AI 2. AI 2 had trade routes to AI 1, but now has to reroute them to AI 3, AI 4, AI 5, etc. Its cpt loss is minimal, since it is only losing at most 1 or 2 cpt for each trade route that went to AI 1. Since the number of trade routes at the stage of the game where Mercantilism is likely to be used is probably only 2 per city, the net commerce loss is quite small.
OK, so AI 1 has done at the very most about 20 cpt in total damage to AI 2's economy by closing borders, and probably less than that. In return AI 1 cannot move military through AI 2's territory (may or may not be a problem depending on the map), cannot send missionaries (may or may not be a problem depending on religious status and forethought), and is less popular diplomatically (always a problem). I personally do not consider this a good trade. Mercantilism has it's uses, but even if you close your borders, inflicting significant damage on the other civ's economy isn't one of them. I regard the diplomatic damage as outweighing the trivial amount of cpt AI 1 removes from the AI 2.
Yes there are circumstances where it is clearly correct for AI 1 to close borders, for example if there is only one other civ, or all other civs are at war with each other. I just don't think you can label an AI as always wrong for making the decision to retain open borders in a normal game. It is not "vital" to close borders under Mercantilism; it is highly debatable. As I've said this is just the kind of AI tweak which I can see as causing an AI to mess itself up (think, does Tokuwaga ever do well?)