At the very least they could get it to recognize obstacles and understand the difference between a defensive and defenseless city to attack. Avoiding bottlenecks and single file attacks shouldn't be that difficult.
The AI in SC2 is significantly better at avoiding bottlenecks and single file attacks than the AI in SC1 was. The SC2 AI even recognizes the need to make air units when it can't attack from the ground. Although it's obviously not as quick to realize these things as a human would be.
It has to throw some ground units at the problem first before it realizes that it should make air units. They may have applied some sort of trial and error approach.
It's called the Monte Carlo method in computer science and it's indeed as close as it gets for a computer to mimic a human's thought process. Basically the AI runs a predetermined number of simulations acting in a purely random manner as long as it abides by a predetermined set of rules. Than it computes the result of each simulation according to certain criteria and determines the best course of action based on which actions scored the highest.
There are other methods but they aren't feasible for very complex games like Civilization, as opposed to simple games like Chess with a very limited set of possible moves and outcomes. There are issues with it however. For one it gets exponentially more resource intensive the more simulations it has to run, so complex games get insanely resource intensive, and in that regard Civilization is significantly more complicated than SC2(strictly from the number of options perspective not game skill, competition or anything like that). For another, due to the trial and error evaluation of random actions, the AI doesn't actually follow a certain coherent logic and thus doesn't actually learn anything that it can later reuse in other similar situations. It has to run all the simulations again from scratch after every move to determine what the best next move is which often leads to some odd conflicting behaviors as changing even a small thing can completely alter the following simulations. And lets not even talk about how much work it takes to program all these simulations and how much it will further slow the game down, and it already gets bogged down in the late game, especially on large and huge maps.