• Civilization 7 has been announced. For more info please check the forum here .

Reducing the extremely high number of units in mid- to late-game

Thanks for the offer. I'm very uncertain whether my general approach (ie, jacking up support costs) will achieve the desired results. I'm quite certain that my initial settings will be unplayable. I'll update as I see what happens and try different settings. The best thing anyone else can do is to try to think of other approaches or mechanisms that might address the objective. Is there any other (or better) way to reduce unit number? (besides the obvious "hard limit", which I don't like)

I think modifying unit upkeep costs is a very good idea. So far my plans are:
  • Allow upkeep costs of units of 1.2, 1.3 etc.
  • Modify upkeep costs by Level and Tier. Later tiers cost more in upkeep and more experienced units cost more. No more will warriors get the same pay as a legendary war hero
  • Upkeep costs scale exponential rather than linear with unit count. That means if you have 40 units and you build another one, it will increase the upkeep of all of them. Right now income increases exponential while costs only increase linear, which I think is the main culprit here.

I will also add some AI code so that there is no Build unit, disband unit, build unit, disband unit loop.
 
very good to hear your are dealing with this sephi :)
 
Some units logically should have reduced upkeep- undead units.

Animals should have lower upkeep also.

cavalry should cost more then other units. Clerics and Mages also perhaps.

If you make the upkeep high enough, I don't think national unit caps would even be needed.
 
it's true that tier IV units already have a national cap ; having a high upkeep might be overkill
and there's the risk the AI will rather have 2warrior than 1champ if it costs the same upkeep.
 
cool, now we can get rid of the silly max 4 T4 units rule. I paid hard to get that tech, I want to make more use out of it than 4 units! :lol:
 
[to_xp]Gekko;9248849 said:
cool, now we can get rid of the silly max 4 T4 units rule. I paid hard to get that tech, I want to make more use out of it than 4 units! :lol:

Don't forget it's a "rubber band" mechanic. Though exponential cost on such units won't lose that feature.
 
Right now income increases exponential while costs only increase linear

I wish I could have stated the problem in so few words! I'm so happy that you are working on this.

Here's results of test game 1, Part I (up to turn 250). Settings: Flauros; Normal Speed; Small PerfectWorld2 map; 10 civs; Houses off but most other WM options on; Tech Brokering off; Emperor difficulty with 3 modifications in the handicap XML:
iUnitCostPercent 115 -> 575
iAIUnitCostPercent 85 -> 425
iFreeUnits 3 -> 6

The surprising thing to me is that the game seems, in most aspects, completely typical. By turn 120 I was near last in ranking, way behind in power (0.2 or even 0.1 compared to most other civs) and about 8 techs lagging (although one of the first to get to Trade). That's typical for me. I never even felt the high unit upkeep because I never reached the "free unit" ceiling (not for lack of production; I had to feed ~20 bloodpets into a goblin/archer meet-grinder for a while). Now at turn 250, I have 5 cities, I'm cranking out one Vampire every other turn (feasting in every city every 3rd turn), 0.7 to 1.4 in relative power ranking, and jockeying for 1st in overall rank. That also is typical for me. No one has DOWed yet (on me or anyone else) but that is not too unusual, and may have to do with map layout (although crowded, there is a buffer wilderness area that may be eating up little SODs before they reach their target civ). Only one thing looks very unusual to me: I have line of sight on one of the leading civ's cities (from spreading CoE). It is the Amerites and they are on an island by themselves, connected to me by a "sea bridge." Although one of the leaders in ranking, they only have about 5 units per city. That is very much not typical for turn 250: I would normally expect to see some 20, 50, or even more units in a city at this point. So, in summery:

  • AI unit level: much reduced at turn 250.
  • AI offence: none yet; this might be a problem but also might be due to map layout or chance.
  • AI tech progress: seems OK, although I have a slight impression that it might be a little reduced. I should be more behind at this point. But then again, I have not met either Malakim or Lanun, which are normally the ones that run away from me on the tech tree.

I'll keep playing this game to see what happens beyond turn 250. Since I generally quit at this point, I have much less experience for comparison. However, I've slogged through a few games up to turn 350, and here is my expectation for un-modded Emperor play: I would quickly pull ahead in tech and overall ranking. The AI unit numbers would go well into the hundreds (turn times would go to ~1 minute). I'd have a much smaller force (only ~100 or so units) but they would easily trounce any AI force. I would be able to expand beyond my 5 cities if I wanted but probably wouldn't out of boredom. I'm eager to see how this plays out compared to my expectation.
 
@Selphi,

Not quite on topic but about the build unit, disband unit, build unit, disband unit problem. This reminds me of the worker build farm, build cottage, build farm,... problem (which Keal said he wanted to fix a year ago but it is still there in base FFH and WM).

At some risk of sounding patronizing (which you don't deserve because your AI programing is excellent), I wonder if you realize that controlling this kind of cycling behavior is a feedback issue. I'm not an AI programmer but I do work in RL on systems in engineering and biology that oscillate like this. Some oscillations are desirable and need to be enhanced: an example is the way your AI builds up army, then goes on offence, then peace, then starts cycle over. This is a vast improvement on the early civ4 AI that just produced a "steady stream" of offence. But back to my point, in engineering you can stop, modulate, or enhance oscillating behavior as desired by providing proper feedback in the system. That sounds so obvious to me that I feel I might be insulting you to say it. I know you've used this principle before, but I'm not sure whether consciously or unconsciously. The only reason I even say anything is because these painful "bad" cycling behaviors by the AI (the worker build farm, cottage cycle) seem to have defeated you and Keal for a long time now. (In this case, some positive value placed on an existing improvement [over a potential improvement] should be able to keep the system in a somewhat stable state without totally locking it up. This is the kind of positive feedback system that helps a muscle cell, once committed, stay a muscle cell rather than constantly flipping between muscle and some other cell type. Or keeps a worker honeybee in a particular task group -- e.g., nurse or forager -- for a while without constantly flipping between jobs.)
 
It's a base civ4 issue but that has never stopped Selphi or other modders before. "Workers don't build over old improvements" is probably fine, although it leaves no possibility for the AI to adapt to changing circumstances. But I'm still seeing this behavior in 8.32 so it doesn't seem that this "hard" fix has been implemented yet.
 
It's a base civ4 issue but that has never stopped Selphi or other modders before. "Workers don't build over old improvements" is probably fine, although it leaves no possibility for the AI to adapt to changing circumstances. But I'm still seeing this behavior in 8.32 so it doesn't seem that this "hard" fix has been implemented yet.


that's the problem.

I remember the first time I saw the AI doing this, it was the orcs, so it was hilarious, because one was farming over a cottage, while on the tile next to him, was building a cottage over a farm. :lol:

-------------------

Anyways, here is my fear. Reading people's gameplay kind of mirrors my own. If the AI has 500 units, and they only have 100, they will still defeat the AI's stack.

So now, the AI will have only 200 units, and the player 100, which means it will be even easier to roll over them.
 
Yeah, that's my exact fear too.

My hope, which may be wishful thinking, is that the AI will use those absurd production advantages they get at Emperor+ difficulties toward city/empire development rather than building many hundred units (most built in piss poor cities that really need a granary and library). The idea is that they should have 50 champions in the field at the same stage that they now have 300 axemen in the field. Of course, if they continue to produce units at the same rate and just go into a stupid build-unit-disband-unit cycle, then it will just be an easier AI as you say.
 
if the ai can't support any more units it should just go to war :)
disbanding them tzk tzk
 
To be honest, there are units that are in the game to counter stacks (which is what the enterprising player uses), so getting the AI to build less units and divert the time to other things will only benefit the AI.

Further things that could lower the number of units:

Make the AI more aggressive, frankly the AI is still very hesitant to ever declare any wars, and sometimes you'll get a war (likely a scripted one) and the AI will just sit and do nothing. If the AI actually went out and used their units they might have less of them, likewise the AI could use all these excess units to do some more expanding. I think the AI gets stuck in a feedback loop with each other in that they are only willing to attack one another when they are definitively stronger, but as the AI are gaining units at roughly an equal rate, they basically never end out attacking one another. Making the AI more trigger happy would fix this. Even if the war is somewhat idiotic, if one of the AI involved comes out stronger (even if it isn't the one who actually declared war), then there's a big benefit.

2. Perhaps change the cost balance of late game units, when you can make a super hammer city that can churn out cannons, arquebustiers or champions in a single turn you know you have a problem. Further more at a certain point around turn 300 you can basically finish with buildings and put all your resources into units, this messes up game balance. There should be more buildings and wonders associated with late game techs, and less of them concentrated in the mid game.

3. Rhye's and Fall used plagues to eliminate units, unfortunately this indiscriminate approach might annoy players what with FFH's focus on getting highly promoted units. If however you changed it so that it couldn't affect highly promoted units, national units or heroes you could be on to something. This could be an even that isn't just a plague but could also be tied to the armageddon counter.
 
Top Bottom