Firaxis Reveals Units can follow only one AI strategy choice per unit

cracker

Gil Favor's Sidekick
Joined
Mar 19, 2002
Messages
3,361
Location
Colorado, USA
This revelation was uncovered in one of the 42 different V1.29 bug and chat threads that are so cluttered up with excited drivel that the real bomb shell might be missed.

Hopefully I have read this correctly, but forgive me if I got it wrong in any way because there was so much garbage and noise to try and filter out.

------

Here's the question for and quote from Mike Breitkreutz FIRAXIS:

"Mike, does this imply that a unit can only have one AI strategy at a time? I see that some can have multiple checks in the editor."

"Yes. For example, the Rifleman has both the offensive and defensive strategies. When the AI builds a rifleman, it will build either an offensive rifleman or a defensive rifleman. Likewise, when you place a rifleman on the map in the editor, you need to tell the AI whether it is an offensive or defensive rifleman (or set it to random and it will choose randomly when you play the scenario)."

------

I consider it a significant revelation that the strategy for the unit is set at the time it is built. If the AI builds an infantryman and decides it needs the unit to fill a defensive role, then the unit gets assigned permanently to that task. If the AI needs the infantryman to be an offensive unit at the time it is built then that is the role that the unit will take on for its lifetime.

This explains a great deal of what we see in the SOD behaviors of the AI in V1.21 and its willingness to commit suicide with attacks against fortified defenders and advancing forces. Knowing that the AI cannot change strategies with its units opens up all sorts of exploit possibilities in the "bait-faint-and switch" areas of strategy.

This further clarifies why the AI players tend to self destruct with units that you define for scenarios whne more than one strategy can apply. We think that we may have done a great thing by defining some early military unit that can also build roads or by defining a late game mobile combat engineer. But in reality, the AI strategy choices are severly limited by the narrow programming choices of implementing only one strategy with a unit. This accounts for why we never see the AIs use these advanced unit combinations in a way that can exploit their the special abilities of the units. The AI has a one path mindset by design and even though we indicate that more than one strategy may be used, the way the units get assigned to a single strategy at birth effectively renders the other task strategies useless for the AI.
 
Wow, that got skipped over. A VERY interesting revelation indeed :goodjob:

It will REALLY help with scenarios if you can choose this. ex. If you build a world war II scenario, make all of hitler's tanks offensive so taht they will attack. Make the french riflemen defensive so they won't attack across the line. It's also great because sometimes you may want one of the tanks to be offensive and the other for defense. I really like this. It does inhibit the AI but it also helps it focus it's efforts.
 
I wonder if this explains some the AI's stranger behaviour - like attacking without warning or prolonging wars without reason. If the AI has a surplus of 'offensive' units then it would try and use them rather than leave them sitting around?


Also if a civ is expansionist then would it create more 'offensive' units than 'defensive' as a trait ??
 
Talk about a ONE TRACK MIND.

Anyone else want to tell me the AI is NOT dumb?

For initial scenario purposes when there are very clear military objectives it is OK; in every other case, or in full games, it is very bad.
 
You got it right. I was the one who posed the question to Mike since I thought that the one strategy per unit idea was flawed when I noticed. It explains why the AI attacks with stacks of Mech Infantry though.
 
It's funny... Is there a percentage for the AI of offensive/defensive unit depending on the type of unit ? For instance, a modern armor would be 80% offensive, 20% defensive, and a spearman would be 80% defensive, 20% offensive ?
I would say yes, because most of the times you see defensive units in a city, no ?
 
Does this apply to artillery units? Are they subject to the offensive/defensive rules?
 
Intreesting question Masquerouge. I wonder if it has anything to do with the aggressivness slider in the editor?
 
Originally posted by Masquerouge
It's funny... Is there a percentage for the AI of offensive/defensive unit depending on the type of unit ? For instance, a modern armor would be 80% offensive, 20% defensive, and a spearman would be 80% defensive, 20% offensive ?
I would say yes, because most of the times you see defensive units in a city, no ?
I think it solely depends on what you set the strategy to...
So Spearmen will never attack, and Archers will never defend (willingly). If both offense and defense are selected in the editor, then there's a 50% chance the unit will be an offensive type, and 50% that it will be defensive. And they don't switch back and forth... at least, this is how I think it works (from experience).
 
>>Talk about a ONE TRACK MIND.

>>Anyone else want to tell me the AI is NOT dumb?

Who ever said gaming AI was smart ? ;)

I'm not trying to tick you off, but (gaming) AI don't think. They are neither dump nor smart. They only follow a behavior model created by the programmer. This model tries to define criterias that basically tells the AI what to do when.

In the end, AI are only good to do one thing: to challenge you so that you can enjoy the game.

There is no game out there with an AI that does more than that. Some may do it better than other, that's it.

IMO, programmers should make their AI model editable. This way, the good players could add new decisions/criterias to the model so that It may be more fun/challenging for all of us. The only (major) problem: how do you build such an editable AI model ?

Ever heard of a game that let's you do such a thing ? Me neither.

The other HUGE advantage that human have over AI, we learn. They don't. Remember your first Civ 3 game ? Did you lose ? Most probably. So the AI wasn't that bad was it ? Thing is, you learned from that experience, the AI didn't. So you're always playing against an opponent that behave on a fixed decision model. Imagine an AI model that would learn from every game you play against it. Ultimately, the AI would be (at least) as good as you meaning you would win 50% of the games. Most probably, the AI would see that YOU (i.e. the human) are always using the same (or similar) strategy and you would probably end up losing more than 50% of the time.

Example, the AI would figure out that when tech X become available to you, you always switch all your production to build building A, B and C. Meaning that for X turns, you are not producing any (or few) military units. In a way, you are vulnerable at that time. So the AI would start mass producing units for X turns before you have the specific tech. When you do switch all your production for those buildings, it invades you massively. He,he, surprise !!!

In my example, what I am really showing is really what we, human, are doing when we play against an AI. We try to discover and analyse the pattern that the AI uses. Once we discover them, we exploit them to our advantages. Every good players does it. It wouldn't be possible to win at Deity if this wasn't the case. Ultimately, that's why AI can't be as competitive as human. Only somewhat challenging.

Personnaly, I would pay 500$ for a game that would offer me that kind of a challenge. ;)
 
The other HUGE advantage that human have over AI, we learn.

Do not assume that all humans learn.
 
I think that some of the posts that we see repeated ad nauseum in the forums are proof positive that some humans learn slower than others. ;)

Maybe humans are just like the units in the game. They can only have one strategy and that is preset at birth. Some humans have the "cannon-fodder" strategy selected and this reflects in everything they do.

Back to more on topic: I think the discussion of the AI building a unit and then deciding that 50% might be offensive while 50% would be defensive is way off base. The AI would probably make a decision that it needed a defensive unit and then would evaluate the available choices for different units based on the A, D, and cost values for those units. The AI would then select to build the best defensive unit it could find in its available build queues based on its limited analysis of the situation. A similar decision process would apply to selecting and building offensive units.

The defensive portion of the build decision matrix is most likely going to be based on some sort of unit/city ratio. This decision process may also be stupid enough to be limited only to a city by city basis, so that only cities that have a garrison of X defensive units may be building offensive units regardless of the strategic positions of the cities or any possible differences in resources and/or proximity to threats or offensive opportunites.

One thing to note here is the continuing folly of manipulating the Hit point values of units in the game to achieve some sort of perceived combat benefit. I am reasonably sure that the AI cannot use the Hit points of a unit in any of its tactical or strategic decision processes. This means that artificially manipulating hitpoints may well be a choice left only for the players that will forever be trapped in novice game play status against what essentially amounts to a set of unarmed or incapacitated AI opponents. This will not stop people from jumping hitpoints up to the 11 or 15 range just because they feel this is cool but it will provide a fairly quick yard stick to separate those players from the players who recognize what actual goes on "under the hood" of the game.
 
Aeson had uncovered this offensive versus defensive tag some time ago, but I don't think that Firaxis ever confirmed it -- good to hear that they did.

BTW, Soren has also indicated that the AI was tweaked in such a way that we will see the AI building more "offensive units" -- by that I mean the AI will be less inclined to build infantry / mech infantry and tag tham as offensive units -- he "promised" we'd see more knights, cavalry and tanks from the AI.:goodjob:
 
Originally posted by cracker
Back to more on topic: I think the discussion of the AI building a unit and then deciding that 50% might be offensive while 50% would be defensive is way off base. The AI would probably make a decision that it needed a defensive unit and then would evaluate the available choices for different units based on the A, D, and cost values for those units. The AI would then select to build the best defensive unit it could find in its available build queues based on its limited analysis of the situation. A similar decision process would apply to selecting and building offensive units.

The defensive portion of the build decision matrix is most likely going to be based on some sort of unit/city ratio. This decision process may also be stupid enough to be limited only to a city by city basis, so that only cities that have a garrison of X defensive units may be building offensive units regardless of the strategic positions of the cities or any possible differences in resources and/or proximity to threats or offensive opportunites.
If you build an undefended city as far from an enemy as you can with every other city having 5 Riflemen, tell me the first thing it wants to build, and then tell me how much the AI factors in when building offensive/defensive units. ;)
 
Interesting points discussed above.

The fact that a unit is tagged offensive or defensive only once seems to limit the tactical options available to the AI.

For example, if the AI could commit a few more units to its offensive, maybe it could do some real damage, depending on the situation. That's what we do as human players: we can evaluate if we need reinforcement during a offensive or we should back off because our defense are too thin.

On the other hand, it's probably easier to manage with the current model. I know most players (like me) don't like this argument. Reality is, ressources during game development are thin.

I feel that if the AI had the ability to commit more unit, it would probably launch everything it has most of the time, and then it wouldn't be able to defend itself properly when the counter-offensive arrives. And that would be really bad.

Obviously, they should have implement this tag dynamically, and not when it is created. Example, if it is agressive and wants to commit 80% offense, 20% defense, it should tag all the current units based on that ratio. The decision on how to tag the unit should then be influenced by unit type, location (i.e. how close to the enemy) and how many units of the same type are nearby. If you are very close to the enemy, tag more offensive unit there.

Now the challenge really becomes how the AI adapts the ratio through the game. When should it be 50/50 ? When 20/80 ? When 80/20 ? What criterias does the AI uses to make that decision ? Now that is complex. So many game elements to analyse. Things like current research spending ?current tech available? number of units? what type of units are available? how strong is the enemy? what tech does he have? how close is he ? etc... Not to repeat myself, but AI are usually not too good at analysing. Better at reacting.

With the current model, it probably just does something like: my ratio is 40/60. I just declared war. I need more unit. Build them based on the ratio. Very simplistic example, I know.
 
Back
Top Bottom