hello. most current version? and stuff.

It could at least pick better units to stack. I'll grant, having stacks of disciples of this or that religion is nice because they're usually not too powerful, but from a tactical point of view, it's kind of poor planning to use them.
Not that I mind. a few spells to halt them in their tracks, some more to bring them down a little, then it's just a mass of almost free experience for whoever I wander along.
 
It could at least pick better units to stack. I'll grant, having stacks of disciples of this or that religion is nice because they're usually not too powerful, but from a tactical point of view, it's kind of poor planning to use them.
Not that I mind. a few spells to halt them in their tracks, some more to bring them down a little, then it's just a mass of almost free experience for whoever I wander along.

You can consider playing with the option where the AI doesn't need to get the upgrade buildings, although this option is very powerful for the AI. Apparently, the 'problem' is that it is hard to get the AI to build these upgreade buildings, and they spam out weaker troops; if you use this option, apparently the AI does value stronger troops. Nonetheless, when they have 600 - 1200 untis (which does happen) they can just overwhelm you.

Best wishes,

Breunor
 
Well ... building units in Civ 4 is a lot like the Prisoner's Dillema, arms race, etc .... its part of the key Economy vs Military choices that are integral to Civ IV.

Personally I see all these AIs build an incredible amount of units ... seemingly beyond what a human is capable even with same bonuses ... yet hardly ever USING such units and, given parity with humans, relatively crashing their economy.

I guess it doesn't matter ... but it is kind of irritating that the AI hardly ever USES their units :D ... again, a lot of it has to do with the "prisoner's dillema" of building units.

Dillema -> do you not build units and have an awesome economy? or do you hoard units in prep for being attacked? If all the AI never built units, humans could walk over them all day with warrior rushes ... however if the AI always builds units and hardly ever uses them (like now) the human can just grow economically and build units later. At least relatively speaking.

I mean really, if you want to go for an economic victory you want simple Military parity. If you are going for a Military victory, you want at least Triple the enemy military ( in effectiveness, whether through numbers or promotions).

I "Suppose" you could set some AI to be merely reactive, simply responding to military build up by trying to achieve (average) military Parity with all neighbors (average by median). Unless they had economical exess to support more soliders, and then build soldiers till that excess is expended, and if they have a greater temporary advantage, to utilize that advantage against weakest nearby opponent/ city.

And then I suppose other AIs (fewer, just the truly war-like ones), will look for Military Dominance (at least 50% more than the next guy) and use their soldiers more often in softening tactics. The more soldiers are on a square (than the other guy), the odds required to make the "attack now" decision decrease exponentially. At numbers parity, odds are as they are now. And if they have less units, odds required to "attack" increase exponentially.

EXAMPLE: Army A: 10 soldiers, Army D: 10 soldiers. Odds required to attack is ... 60%+

Army A: 12 soldiers, Army D: 10 soldiers. Odds required to attack is ... 56%+

Army A: 20 soldiers, Army D: 10 soldiers. Odds required to attack is ... 30%+

Army A: 30 soldiers, Army D: 10 soldiers. Odds required to attack is ... 10%+

and on the flip side ...

Army A: 8 soldiers, Army D: 10 soldiers. Odds required to attack is ... 70%+

Army A: 5 soldiers, Army D: 10 soldiers. Odds required to attack is ... 80%+

Army A: 2 soldiers, Army D: 10 soldiers. Odds required to attack is ... 95%+

Army A: 1 soldier, Army D: 10 soldiers. Odds required to attack is ... 99.5%+

as the soldiers attack ... the computer calculates after every 5 battles. If they sacrificed 5 soldiers for nothing (the RNG hated them) if they don't have enough excess soldiers ... then they may cease the attack. However, it would allow them to throw away extra soldiers in order to give them better odds with their prime soldiers (something they SHOULD have been doing the entire time! :D ) ... and it would allow them to use all those extra soldiers to MAKE VICTORIES instead of just waiting for good odds. :/


as for Heroes ... should always be accompanied by at least 1 similar unit. (1-5 unit bodyguard at all times). A hero should never attack alone. A hero never attacks below 90% odds ... and a hero (does NOT) count towards the unit-count in the previous equation. Also, regardless of odds, any Bodyguard units never attack!!

// that's how I would do it if I knew how to code the AI
 
I'm pretty sure the AI is already coded this way. Your example works for one computer when pitted against one other computer or one other player, but falls short when multiple AI are all attempting to make these decisions. This is also one of the reason the computer falls off so drastically when the player obtains military superiority. I also don't agree the computer should ever attack at 10% odds simply because it's too many units lost that could easily result in retaliation from either the defender or more likely, another civ. Of course this results in armies just standing outside of your cities forever hoping that your defenses will mysteriously lower themselves, so the computer needs to be programmed to understand when to give up on an attack and make peace (even if their believed military might was greater) or to at least pillage all your improvements.

In any case.. to explain why this coding doesn't perform so well, consider that the AI is programmed to build x number of units + x number per city (which they are) then they are programmed to try to achieve an equivalent level of power with their neighbors. Well what happens when two other computer players gain a military advantage without an equal economic disadvantage and have decided to prepare for war against each other? The two computers on equal footing continue to feild an equal military but neither side attacks because their success is low while the disadvantaged computer starts building more of their shittier units, and puts them at economic disparity. Unfortunately the economic disparity (and military advantage) continues to grow larger and the lesser computer continues to try to compensate with a larger military further pushing them into a hole. Until eventually they cannot compete and the stronger computer(s) steamrolls them.

The computer reacts this way against the player all the time and is it's primary reason for doing so poorly. What the computer needs to be programmed to do is far more complicated than simply building units.. It needs to calculate the odds of a successful attack against it and requires a level of map awareness that it currently does not possess. For example: If Computer A is positioned between Computer B and Computer C, he needs to be prepared for an attack from both sides and build a military strong enough to -defend- Computer A needs to prepare it's forces on a single border and prepare a military strong enough to -attack-. However this is largely based on whether or not it is to the advantage of computer A to attack or to trade. That is to say the computer needs to understand how much additional economic disadvantage he has to accrue to mount a successful attack and the long term gains of those cities, versus a peaceful arrangement with his/her neighbor.

If one civ recieves military advantage over another, that civ should not jump to equal his military, he should instead calculate if an attack will be successful based on the bonuses of his city defenders against the assumed bonuses of the attackers (would have to be some randomness here) and set a long term goal of improving his military via technology or buildings, while attempting to keep his defensive military above the potential offense. The human player understands it's easier to defend than to attack.. the AI needs to utilize this understanding as well.
 
True, map awareness would be good. And yes, having an excess of units is a perfectly good reason to attack at lower odds.

Still, if it can calculate that its economically better off to negotiate/trade with its neighbors and defend itself with minimal (higher tier) units ... all the better.

If you did an economic AI model, combined with my numbers model ... then AI with higher tech and lower numbers of units would attack only at higher odds for victory, while AI using mass-hoards of units would attack at very low odds for victory.

As for when ALL AI have roughly military parody and they get stuck in a bad cycle of miitary continuum ... this is when Collateral Damage (Catapults and Magic) come into play.

A well timed Collateral attack may be able to topple a roughly militarily equivalent force. ALthough it would require probably more map + terrain awareness than even you are asking for.
 
Back
Top Bottom