Writing game AI is an extremely challenging and thankless task. They aren't allowed to use machine learning or any other cutting edge AI techniques for performance reasons - players wouldn't have the patience to sit still while it learned from its mistakes and used your GPU to build predictive models of your future actions. AI in games can't really be called AI at all, the programmers are only permitted to use decision trees and hard coded fitness functions with predetermined responses. These are techniques that were the cutting edge of AI in the 60s. Trying to exhaustively enumerate every 'common sense' action one can take in an even moderately complex game and hard code the exact conditions under which it should be executed is a nightmare. TD lambda could be applied, but becomes prohibitively expensive in huge state spaces. Chess can be played exhaustively 7-ply (7 moves in advance) to crush human players because there are so few possible moves.
In short, the difficulty of creating a good game 'AI' increases exponentially with the complexity of the game, the kinds of techniques amenable to solving those problems sensibly are at the forefront of computer science research, and you wouldn't put up with the maintenance required for a genuinely intelligent game.
I'd bet GalCivII's reputation as a game that has amazing AI - whether true or not - has sold more copies than any other quality about the title. Gamers are extremely appreciative of good AI.
I'm sure AI is challenging as fuck to program to be fun, but at the same time that's kinda why it's important. What I think matters is how the AI is structured within the gameplay elements. For example, the Civilization series.
Games like Civilization almost need two different kinds of AI, tactical and strategical. IMO, Civ5's strategic AI actually isn't half bad. It understands the victory conditions and generally seems to understand that to win it might have to stop others from winning first. The problem is that it can be exaggerated to the extreme (you go to war with them, or wipe someone out, and you're unlikeable forever; their city placements can often times be desperate and half-cocked). And, sometimes, there's really no measurement of what the fuck is actually happening diplomatically speaking. Friends and enemies aren't really 'made' in any sense which, IMO, has
always made Civ5 feel like it has so little personality. Civ4 had
very clear indications of diplomatic issues and there was little question of what was going on. AI's had patterns likes Civ5, but they were also governed by very clear diplomatic modifiers in religion, borders, trade, etc.
Tactically, Civ5 is utterly lost. Zero challenge. Truly. And its tactical stupidity ends up trivializing its strategic passability. Civ4's tactics weren't
that great, but the simplicity of the squares and doomstacks still made it dangerous if you were unprepared. The gameplay structure - squares, doomstacks - helped overcome, or even hide, the AI's faults. Civ5's large health bars, 1UPT, hexed tiles, etc., makes it insanely easy to just run circles around enemies. When my girlfriend first started playing Civ she'd get invaded by a huge army while only having an archer or two and she'd freak out. But I'd explain to her that the AI is fucking retarded and to just play smart. Now Montezuma comes over the border with his dumbfuck troops and she's like whatever. Civ4 you'd get like 20units in a single stack and you'd shit your pants because they were a fucking spearpoint, an unstoppable train whose primary opposition was pure attrition - a very easy aspect for AI to understand - and you either had that attrition force or not. A preparation very tied to your strategic competence (and a gameplay mechanic upon which almost the entirety of Sid Meier's Colonization ran, by the way). Sure, this left very little 'tactical' though in play, but the idea of tactics having nearly as much importance as Civ5 pretends to give them is, inherently, pretty fucking silly anyway. Civ4's handling of conflict seems a little more wide, like two large stacks of doom hitting each other until annihilation is achieved. Pretty historical, in some regard, and just seems more 'at home' in the passage of time Civ tends to depict. Civ5 feels extremely odd with its minutiae of cleverly moving troops through the treelines and hills while, in the greater scope of things, thousands of years are passing by. Civ5 tried to make the combat something it probably shouldn't have been and the AI got exposed because of it.
A lot of AI taking advantage of the surrounding gameplay elements can be seen in first-person shooters. Take F.E.A.R., for example. The levels were designed to facilitate the AI, and vice versa. It really shows, too. So I can imagine, in part, a Civ AI programmer being told to create an AI that handles strategic levels of international diplomacy while at the same time crafting tactical aptitude at a level that seems fragmented from the general passage of time that the strategic aspect uses, and his response is just what the fuck. And I can
easily imagine that the guy who did Creative Assembly's AI was probably shaking his head with a stupid, incredulous grin on his face when tasked with doing AI for strategic and battlemaps, both of which encompass land and sea. Which is why I'd think, by this point, developers would be putting more manpower and resources into the AI. But I'm no engineer. Maybe it's usually done by one person because more than that would cause confusion, I dunno, but I'm constantly scratching my head at developers who put so much time and effort into a game, and then just short-change the AI. It's like they built this hotrod of a car, and then put a copper crusted battery from 1969 in the engine block before taking it to the show. And then you get to see the car and it revs up and promptly dies, and you're like fuck, that's a nice looking car, too bad we didn't get to see it do anything cool.