The AI has access to map data for strategic reasons, i.e., as suggested, to settle near as yet undiscovered resources, like coal.
The AI also, though, for game-play purposes, knows which parts of the map it has not yet explored, and has been given orders by the powers that be to explore.
Also, while the AI knows where resources are, it DOES NOT know how to get there unless that part of the map has been explored. This is hard to tell on most maps, but play on Marla's world map enough and it is very identifiable.
The AI also knows where your units are. AI will go to great lengths and distances to hunt down one of your pirate ships*, or attack your city with the fewest defenders, bypassing heavily fortified cities to do so. I suspect there is an equation that sets the value of each city for conquest, - strength of defense, (with a small random variable if the programmer was halfway decent), and then sends the troops in.
For example: City Size 12 = Value of 12, + Rubber in fat cross (+10) = +22, - 8 (2 musketeer defenders) = conquest value of 16.
On the other hand, I have seen Germany, for example, bash its head on a stack of mine fortified on a hill, behind/inside a fort. My stack was in my territory but inside Germany's fat cross, so that may be a factor as well (threat value). Sharing a fat cross with the AI drives them insane. If I were a programmer, I would also set an overall random factor of, like, 4%, to set a completely random target for a war's effort.
*although in my current German game they are leaving my stacks of pirate ships alone... probably out of fear.