There has been a lot of debate recently about AI, alleged AI deficiencies and possible AI improvements.
Although much of the discussion was nothing more than value judgement ("tastes great!" "less filling!") and causes some of the very good ideas (such as
Arralen's interesting threads) to get, perhaps, overseen, one thing seems to have become a bit undifferentiated: the difference between strategic and tactical AI, or AI calculations used in strategic and in tactical usage.
It seems to me that a lot of the recent discussion about the lack of AI quality has been addressing the strategic AI -- that AI which makes a computer play a nation in a clever, efficient manner: by setting good goals to reach and implementing the means to produce them. I think Arralen has addressed two key issues which both have to do with this area of the AI.
I call it "strategic", because it affects the way the computer carries out goals which will enable it to act as a human carrying out the main goal of winning the game. It is strategic AI, I think, which makes up a large portion of that which enables a person to have both a satisfying challenge and a worthy opponent in SP experience, whereby lots can be done, as people like mlepinski have pointed out, to enhance the SP experience without changing the strategic AI.
Although I dislike the tone used by many who "complain" about the alleged lack of "good AI", I also feel that the *strategic AI* could be optimized (or: made even better than it already is), and that Arralen has put his or her finger on some ways of being able to do that. (Whether his algorithm ideas can be implemented is another question entirely.)
But there is one other area which affects our gameplay and involves AI, and this I would call "tactical AI", since it chooses which actions are implemented during battles, such as movement of individual troops, targeting, spellcasting, retreating, etc. There have also been lots of cries to have *this* AI improved, whereby (to my knowledge) no one has actually been able to say *how* (that is: no concrete solutions to the strategic AI improvement a la Arralen). Instead, there have been many suggestions for improving the way the AI should deal with our wishes, such as toggles for spells which should not be cast, etc.
It has been said that the AI can not (reasonably) be improved because of the sheer complexity of things between which it must choose. DomII is not like Chess.
The point of my ramble so far is this: I think this can be truthfully said of many aspects of the "tactical" AI (sure, one could optimize the tactical AI even more, but at what cost?), but that the "strategic" AI might benefit from a troop-building, castle-building, and attack-a-province calculus quite a lot. Would those things be actually hard to write and test?
One more question: I would like to ask whether the tactical AI also takes into account target analysis, for example: if there is only one valid target, and this target has the property (say) "immobile", then greatly lower the priority of casting movement-inhibiting spells on it. I don't know how this AI works, but it does often seem to choose spells against which the target is either immune or unfitting.