ralphtricky -> RE: Decades of Development (7/3/2007 6:22:31 PM)
|
quote:
ORIGINAL: geozero Okay... so since we are dealing with a STRATEGIC level game, perhaps one way to look at the AI issue would be sort of similar to real life military chain of command... Have several "layers" of AI decision making. Upper most level would make decisions or "orders" to t he lower layer, then that layer would take info and make decisions, and so on... let me explain in layman's terms. Suppose you play AXIS and the AI opponent is the Allies. Typically, Germany invades Poland first. The Allied AI upper layer decides to a) declare war, or b) not declare war. IF decision A is made then it orders it's military and production to a war footing (If "B", then Allies remain Pacificst for now). This changes IF Germany declares war on Allies of course... assuming that decision A is taken, the Allied AI now has to look at the Situation... there's no combat yet in Africa, so nothing is done there. But a lower AI layer could decide to A) use bombers to attack Germany, B) have France attack in the West, C) send out the fleet in Search & Destroy missions against Axis subs and surface shipts, etc, etc. Let's say decision B above is activated, Now a lower level AI decides which French units will attack and which will remain in defensive positions. Which targets present a better attack outcome? An undefended German city? A weaker Axis unit? etc. That's how AI should work. Yes it takes programming. If, Then, Else commands as noted elsewhere. When enough of these scripts are programmed the opponent will make very good decisions, whether it is what type of production to build, where to attack or defend, when and where to invade, etc. We were programming this kind of stuff way back in the 80's using Basic. Puts on fire retardant suit...[:D] That's called a hierarchical AI, and is fairly popular for some genres. It has the advantage that it breaks the AI down into manageable pieces. You can add things like allowing communication both ways so that a unit can call for help if outnumbered, etc. and it should be able to do a credible job. It also has the advantage that if you design it right, you could allow a human to work at any level of the hierarchy. I think that CotA probably works this way, and it can produce an AI that 'feels' realistic. Another tool is something called influence maps that help break down the map into different levels (similar to zooming) depending on the level of the AI, and is also very useful for doing things like finding fronts, flanks and chokepoints, as well as general planning. Programming the low level Tactical level of AI gameplay is fairly well documented, and there are several books on how to do an AI for a FPS or RTS game, and many of these techniques can be adapted pretty easily. At the tactical leve, an AI should be able to outplay a normal human, it knows the rules very well, and should be able to figure out exactly what attacks to prosecute in what order with what units to maximize he damage while minimizing exposure. Much of this can be reused between games if you're luck. The top level Strategic level is a lot different and has to be built from scratch for each game. The rules are totally different for each game, and the gameplay is different. Things like deciding the overall game plan, and which front to attack, etc. aren't the same in each game. When you add in research and production decision, it gets even worse. The problems are that it takes a lot of work to program an AI, and much of it can't be finalized until the game has been almost finished. Any change in the rules can have far-reaching effects on how well the AI functions. The example of amphibious attacks requiring PP is an extreme example. If you're using a hierarchical AI, the level that decides how to spend the PP needs to get input from the level that decided that an attack would be a good thing. That sounds simple, but if it's the first feedback like that that's required, it could be a very large effort. If you're designing a monolithic AI, the consequences could be even greater. When I do the AI redesign for my game, that's probably the way that I'm headed. Ralph
|
|
|
|