ORIGINAL: Szilard
The AI is very poor. I doubt it will ever be excellent, because that would probably require a complete redesign of the underlying data models. But improvements should be possible without too much effort.
Disclaimer: I have a PhD in AI, and my major interest in TOAW is designing situations for AI vs AI play. I doubt that I represent a huge part of the customer base
Anyway, I think it's useful to think in terms of two major AI categories:
- "Tactical" level: how the AI controls individual units within a formation.
- "Strategic" level: how the AI coordinates the activities of different formations.
Conceptually, it's not hard to describe what an excellent AI would look like. At the "tactical" level, it would be reasonable at handling common military tasks such as: forming a defensive line; avoiding being cut-off; withdrawing to a new defensive line; counter-attacking to restore a line; etc etc etc.
TOAW is poor at all of these, IMO partly because it follows the common Jim-Dunnigan-era approach of basing the tactical level on a completely inadequate follow-the-numbers objective model. But even with the poor modelling, I think it should be possible to fix some of the worst problems: eg formations on the defensive having no concept of being cut-off, and taking no action to avoid it.
The MGE edition actually does a lot better job in many areas. You'll have to judge for yourself, but TOAW shipped with several critical flaws.
1) There was code in there that actually understood flanking, etc. It was left out at the last minute because of a programming error, which could not be fixed because it would unbalance a number of scenarios. Whith this code re-enabled, the PO should do a better job of retreating, etc. This piece of code has an interesting comment to the effect that it was being left disabled because it would unbalance all the scenarios.
2) There was another critical error which caused it to stack instead of spreading out on the attack. The new PO does a more credible job of attacking, and a more realistic job of defending.
I've also made a number of smaller improvements to the tactical engine, although there is a lot more small things tha I could do.
Remember that despite the complaints, Elmer is already pretty sophisticated, he can do air drops, sea landings, move the aircraft up and back to maintain the correct distances, repair bridges and rail lines, etc.
To get a really good AI, IMO you need to go beyond the objective hex model. I want to be able to paint a line of hexes and tell a formation that it is to defend that line, and paint another as a secondary defense line, to which it should withdraw if the first becomes untenable - etc. For this to work, the AI has to have some understanding of a "line", a "withdrawal", "untenable" etc etc. It requires a lot more smarts than the objective model, but on the other hand without those kind of smarts it can never be a really good AI. It's certainly doable, but it would be a lot of work of a fairly specialized (ie, expensive) nature.
Elmer actually understands these in a simple but interesting way. When flanking, for example, it takes a line perpindicular to the line from the previous objective through the formation center. This is part of the code which was disabled. A lot of the formation control code was actually done, and it was very well done overall IMHO.
TOAW pretty much completely ignores the "strategic" aspects. Obviously, the ideal is an AI "general" which can set tasks for formations and coordinate them. Now you need an AI which has some understanding of a further layer of abstractions, at the formation level; again, a lot of expensive work to do it well.
Yes, that's going to be a tough one. It's fundamentally different from the tactical leve, and I've had problems finding references on how to build that layer, although I've got some good ideas to try. Even without that, because there aren't any random scenarios, TOAW should play a reasonable game now.
But I think there might be a couple of "strategic" things which could be added to TOAW without too much work. In particular, I'd like to see a real concept of "strategic" level reserves, along these lines:
- Ability to designate Formation A as a "reserve" for Formations X, Y, Z ...
- Under certain circumstances, the AI assigns Formation A as a reinforcement for one of X, Y, Z ... by giving it the same orders and objectives. It might be that Formation X on the attack is doing very well, and the AI acts to reinforce success. It might be that Formation Y on the defense is under great pressure and the AI decides to buttress it.
- Once the trigger which led to the assignment of Formation A as a reinforcement no longer applies, the AI returns it to "reserve" status, and it disengages & moves to the rear.
- Ideally, there would also be an event which would allow a formation to be swapped in/out of reserve status depending on its loss/supply/readiness levels, as compared to othr formations.
A lot of the code was actually laid for the use of reserves, although the key points of when you use the reserves, and when they would go back to reserve status isn't very clear to me yet. Elmer actually should make use of reserves within the formations.
Obviously, this sketch would need to be fleshed out before it could be implemented, but I think it could result in something which significantly improves both the quality and the realism of the AI.
In particular, the triggers would require the AI to be able to recognize "success", "crumbling defence" etc etc. This would be non-trivial, but it has to be remembered that the goal here isn't the creation of some perfect military genius - just an AI which does stuff which is plausible.
That is the tough part. Elmer actually does recognize both the global strength, and the local strength that it's facing. It uses these and the orders it was given to formulate a general attitude.
A problem I'm seeing in Arracourt is that the Germans are outnumbered both in the theater, and locally, so it's ignoring the attack orders [:D] The stupid AI is acting rationaly!! It's a soldier, it's not supposed to do that!!!
I have quashed several non-fatal bugs that 'Make Elmer Look Stupid', the most recent one was which fords the engineers attempt to occupy to help the troops. It was not always going to the optimal place. This probably doesn't impact any scenarios, but you would see the N Korean engineers in Korea running to the north instead of the south.
Longer term, I hope some thought can be given to opening up the AI somehow or other to 3rd party hobbyists. It would be great to see an engine which let 3rd parties code up a "counterattack to restore line" or "perform fighting withdrawal to new line" tactical behavior, or a "general-in-chief". I can imagine competitions between different AI's, if enough people got interested.
I'm waiting to see what the Civ4 OpenAI looks like, to see if that's a reasonable model (I doubt it, they're different genres.)
I can see opening up the General in chief AI, since it's fairly 'simple', and still in it's early stages. I'm not sure about the formation level AI. It seems like I should be able to do a good job of polishing that piece, the MGE version does a credible job. I can see opening up many parameters for specialalization, either per scenario or overall. (It will help me tune, anyway[;)])
I would also like to beef up the event engine, I'm not sure of exactly what it will look like, but adding the capabilities of a full scripting engine seems like it would help.