Should there be a hard cap on units?

Secret_Squirrel

Chieftain
Joined
Jun 19, 2009
Messages
76
While playtesting my AI, I have come across some mighty powerful AI stacks of doom. This isnt a bad thing as they are more than challenging enough if you let them get powerful. I have however come up against stacks that just straight up break the game, here is a good example:

Mechanos, Monarch Difficulty - Turn 289



In total they had in excess of 600 units and were trying desperately to cope with economic difficulties now that hundreds of units were no longer in their borders due to war.

Most importantly however, turn times became unbearable and I couldnt even fathom the amount of time a human player would need to kill a stack of that magnitude.

So my question is, should there be a (high) limit, perhaps based on number of cities or another scaling variable, of total number of military units? Should this be just a total hard unit limit cap or should it delve deeper into limiting certain unit types? Maybe even including technologies?

If I thought the game could handle it then I wouldnt mind so much but imo, something has to be done.

Note: I am only talking about limiting the AI, not the player, that would be another discussion entirely.
 
I've seen stacks like that! The funny thing is, they're often more annoying than frightening. Granted, I'd be frightened of being shelled by 44 Organ Guns at once (surely some of them are promoted in such ways as to be able to completely kill units), or attacked by a wave of 87 Witch Hunters at a time, but often you're looking at low tier units, by the dozen, which simply take time to chip through, and the annoyance is just not worth the combat XP.

No idea how you discourage the AI from that kind of grouping, but there has to be a happy medium between stacks of minor harassment and stacks of everyone-and-their-grandmother.
 
This seems to be a concept that can be reasoned in a couple different ways.


1. Are the AI losing because of the economic hurt vs. Are the AI winning due to military strength?

If this is a problem where the AI's own actions are killing themselves, then they would need to limit unit production in some manner -Ideally with an economic appraisal that would adjust a civilization wide cap -rather than city based--.

If they are winning because of their super stacking, then they are acting intelligently and therefore should not be modified to act as less intelligent.


2. Is the player being inconvenienced by this behavior?

If the player can't play the game due to turn times, or can't handle the super stacks strength, then I would recommend the addition of an AI and Player limitation on unit count -based on map size-. I say AI and Player because I am personally against limiting the AI in ways that a Player isn't.

If game play is unhindered -as it seems not to be- then a cap is not needed.


3. Is realism out the window with such a stack?

If you were to consider the sheer enormous amount of food to feed such an army, then to merely have said army should starve the nation into nothingness -or at the very least, permanently ruin the tiles they walk through as they effect the environment by eating everything-. This line of thinking might propose that a unit count cap be created based on the total food being produced/gathered and the healthy/unhealthy total for all cities.

-I rather like this one the most; though it would seem to be the hardest to code. Then again, this would then exclude Scions, D'tesh, Golems, etc; maybe they could use a sort of magic to sustain themselves and that be the theory behind limiting them to a realistic unit count.-


It does seem a cap is needed; but an AI only hard cap might not be the smartest answer for the AI and players' sake. Those are my three cents, as it were.
 
I agree there is no simple answer. My initial idea is to put really high safety net limits on certain units, just to stop it spiraling out of control. For instance, when was the last time you needed 50 Horsemen when you and the rest of the world had Iron Working?
 
As AI stack/production over specification goes I agree, a population of 50 horsemen would be somewhat silly -if they have higher str/tech alternatives-.

-Hm, I wonder if 50 horsemen could beat the equivalent production of their iron working counterpart; if they could, perhaps they are acting smartly by building enormous numbers of weaker units.-

The solution to the question of over specification, or building the wrong unit in general, would be tricky to answer. You would have to teach the AI how to build a balanced stack based on what they can build, what their opponents have, as well as what they already have built. A cap here might be the temporary answer, but in the far future a more complicated unit production algorithm should be conceived.
 
You could build 25 Champions for the same cost as 50 Horsemen, its totally not worth it to build the Horsemen at that stage except for the occasional pillage/misdirection/mopping up.

I agree that a more long term solution is needed to represent the "realism" aspect of war as you put it.

Ok so I think I'll start trying to implement an "informed limit" feature into my AI mod that stops them going crazy on low str units when there are better alternatives available. That should be a good start.
 
I have to say, no 'hard' limits unless absolutely necessary. They're fine early game, but I don't want a successful late-game AI to have the same cap a poor one has.

A 'soft' cap that takes the players economy into account, however, could work...

Personally, I'd prefer to avoid a cap altogether and teach the AI to inherently monitor their economy while building units, but that's rather more complicated.
 
can you post a few screenshots of their cities? I really wonder how the mechanos got that many units. Or is this common in FF+?
 
Sadly I dont have the save any more. I wouldnt say it is common, but if a civ is allowed to mass produce in the mid to late game, especially on the higher difficulties, they can get out of control.

My current solution is to point out to the AI cases where spending hammers on certain units would not be wise. For example using the case of the Horseman again, I have modified the AI so that they will not spend hammers on more than a few Horsemen when both them and their opponents have access to Iron Working and Iron Weapons, or many other tier 2 units.

Hopefully once I have implemented and refined this feature for all relevant units, the AI will have a simple understanding of whether a unit is going to be useful at the time it is built given its other options and the technologies of those around them. A hard or soft cap wont be necessary as they will be efficiently spending their hammers and understanding when units become of limited usefulness.
 
I would say to put a hard cap on teir 2 units once teir 3 ones are available (ex. champions are available, put a limit of say, 5 per city on teir 2 units like hunters and horsemen). This would prevent having a large army of teir 2 units when they could have a smaller (but more powerful) army of teir 3 units. You may want to make exceptions for people like the Khazid though, who cannot build many of the teir 3 units.

Aside from that, I wouldn't recommend putting a cap on units. Maybe tell the AI to not prioritize new units when not at war and they have more than x units per city or something like that. But thats the most I would think for an AI cap.

-Colin
 
Top Bottom