Re: SUGGESTION: AI troop building algorithm
How about something to discourage the building of units that don't go well together? Like if the comp has 60% of his already built + will be built forces (measured by gold + resource value, not unit numbers, so one knight will be "more" than 2 militia) as units without missile weapons (exclude javelins and other such minor missiles)and with less than, say, 13 prot, it will feel less compelled to make Archers, Comp bowmen, slingers (excluding Mictlan warriors with slings) and Longbowmen. Maybe have it roll a 3 sided dice, and if it lands on 1, proceed with archer building, if not, abort. Having 60% or more of your army being units with 13 or greater prot makes the three dice roll apply when the comp wants to make crossbowmen and other artillery types.
A way to improve location might be to might be by giving forts that are closest to an enemy province (not indep) that borders on your province a higher priority when building. This will be measured in "provinces away," so a fort that's two provinces away from an enemy will have a higher priority than one that's three provinces away. The capital might be exempt from this rule since there are cap exclusive units.
Maybe this can just work with unit Groups.
Edit: There might also be an impact on troop building depending on the neighbor and his force's composition. If the AI "sees" enemy forces with many hoplites, it will bump down light infantry, and missile units production and train more heavy infantry, heavy cavalry, and artillery/crossbow type units. If it sees tramplers with morale lower than 11 and no berserking, it will build more missile units. But always bump up production in units that are as big as or bigger than the enemy's tramplers.
Is that realistic?
Edit: This also makes it possible to reform the difficulty system, where instead of cheating on pretender points (that's the current AI difficulty setting, no?) we can enable more AI features at harder levels and disabling AI features at easier ones so it actually plays smarter/dumber. For example, an impossible AI might know not to mix Knights with Crossbows and orders non-combat commanders to flee instantly, or give assassins optimal assassination equipment whilte an easy AI wouldn't care about unit mixes in combat and wouldn't equip assassins with good equipment.
Edit: thought of something else. You could also factor in spell to troops synergy (I believe that's the right word for worky-togetherness). If the AI utilizes an army of light infants, it could be less inclined to cast flying shards, while friendly high prot units and hostile low prot units encourage it. It will not summon Air Elems when facing enemies composed of units bigger than the elems themselves. If it's got abysian or other heat resistant units, it will bump up desirability for heat spells.
[ May 10, 2004, 03:18: Message edited by: HotNifeThruButr ]
|