Gaming Links

What I've Written

11/16/2005

A reply to my AI post

Now that Bruce Geryk has become a regular blogger as well as a regular reader of Portico, he has commented on a couple of my posts.

Be sure to read his new post. It's a reflection/reply to my recent thoughts on game AI in general and wargame AI in particular. He started chafing in the comments to that post, but thankfully he took the time to right down his thoughts in more detail.

As usual, he takes up the cudgel for Korsun Pocket and SSG. And, as usual, he may be on to something.

3 Comments:

Having some knowledge of strategy (war) game AI though my experiences with the Paradox series of games and tweaking The Operational Art of War, I can agree that programming AI is not hard.

For instance, in TOAW, which would be a Bruce-style complex wargame, the AI was actually quite simple. However, it was effective because it was broken into smaller pieces, with each piece managing a certain situation. It was up to the scenario designer to designate which units and formations were to perform which task at which phase of the game. Once those tasks were defined, the corresponding piece of the AI took over a really very limited set of responses. For instance, formations set to act in defense of a particular hex would simply seek to fortify themselves in favorable terrain, facing in the direction of the attack. As you would imagine, this falls apart under attack from multiple directions...and it does. The offensive AI is tagged to follow terrain favorable to rapid movement toward its assigned objective. This generally ends in failure, unless the scenario designer carefully plans the makeup of the formation's units, because the game AI only makes total force calculations in battle, and does not make special exceptions for particular types of equipment. The attack AI in TOAW will generally tend to stack anything and everything when making a push into a defended hex, as long as it matches up what the AI considers 'acceptable odds'. Thankfully, the computer is very good at math, and generally picks really good odds, however, if the scenario isn't designed correctly, and the computer's force is insufficient, the AI fails miserably.

The AI in Hearts of Iron 2 is broken up in similar fashion. There's the Garrison AI, the Front AI, the Beach Invasion AI, ad nauseam. Basically all possible operational choices are assigned an AI to handle the situations. Again, the scenario designer is the real master of the 'intelligence' here. The Hearts of Iron 2 AI generally fails against multiple fronts, unless you assign enough Garrison units to delay invasion on the second front and allow the Operational AI to move troops from the Front AI to Garrison AI. There is also a lot of hardcoded AI scripting which gives certain historical and certain vulnerable provinces more operational 'weight' than others, which means they are disproportionally better defended than 'less historical' provinces. This can lead to a lot of exploitation, and requires a lot of tweaking over time and frequent testing (as evidenced by Paradox's propensity to 'patch' games).

So what am I trying to say? Simply that AI is not so much Artificial Intelligence (like you see in ZE MOVIES), but more of a Scripted Conditional Opponent that is carefully equipped by the scenario designer to respond to a certain set of reasonable circumstances, but cannot, for obvious reasons be able to take on every contingency.

That said, neural networks are great, and there's a lot of promise in the genuine AI field, but the algorithms still aren't able to keep games as unpredictable and challenging as a human opponent. If you want to do experiments with a fairly smart neural network AI in a game setting, try out Neuro-Evolving Robotic Operatives; a neural network building demonstration out of U Texas which outputs the neural network that you build to a program/script readable format for use in AI routines. Quite a useful tool, and fun stuff to boot. http://nn.cs.utexas.edu/keyword?nero

"AI is not so much Artificial Intelligence ... but more of a Scripted Conditional Opponent that is carefully equipped by the scenario designer to respond to a certain set of reasonable circumstances"

Interesting. And that fits with the description Roger Keating gave me a couple years ago after the release of Korsun Pocket: he said you could essentially make your own AI scripts using the scenario editor because that's how they programmed the game's AI themselves. Maybe they're just really good at scripting.