There's been work on robots (automated cars are just that) for years. I remember seeing automated cars driving on circuits with a few special landmarks 15 years ago. The car, robotics, electronics, military industries have all been trying to work on this for decades.
On the other hand, each game has its own rules, and there is a lot that would have to be reinvented for every game.
Pathfinding is more or less the only thing game ai does rather well, and even then you can see professional packages that are unable to provide a simple "find path to area" routine, only "find path to point", even though it's braindead simple to adjust the code to do that (the algorithm needs no change).
But when it comes to the point of handling conflict, even for pathfinding, the ai falls down. If you can block the ai path, should it compute another path or try to keep going? If it does predictably the same thing, it can be abused. For instance, I remember one game where I blocked a CtP2 enemy stack at some 20 squares distance by just moving a lone unit from time to time. If that hadn't worked, I could have ambushed it since the path it took was obvious.
Even the highest level ai depends on rules which are fickle and change a lot. Evaluating that something is good is pretty hard. Many humans are just unable to think correctly of the way they evaluate a situation, and express it. AI developpers have to be able to express it, abstract it well enough that when the game designer changes everything halfway through the coding, not everything must be started again from scratch, and they must do this with little background, little support from the rest of the industry, and with big constraints on computing time and development time.
To get a good idea of the state of ai in the game industry, you can look at
this paper.
It's quite interesting, but you can see if you browse the site that much of the current games focus is on procedural animation, on brains that tell the animation engine what animation to play and nothing about strategic or tactical issues.
Even in military simulation, ai is still pretty limited. It's used to provide automation, not automatic enemies. It's very much like the car ai, namely it's supposed to apply a doctrine at a low level, but is unable to make decent decisions at a strategic, or even high tactical level.