• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Hiliadan

Major
Jun 17, 2018
614
6
This is a continuation of these threads: http://aow.triumph.net/forums/topic...ai-do-in-auto-combat-and-that-would-need-fix/ and http://aow.triumph.net/forums/topic...ined-by-extremely-poor-ai/page/4/#post-264438


The stuff we can actually edit:
See also https://age-of-wonders-3.fandom.com/wiki/AI#Modding_AI

Strategic AI
– maximum number of summons per spell (e.g. Banshees limited to 4) – Max AI sustained at once
—- In particular: Banshee and Dread Reaper are currently limited at 0. The max of different class scout units should be reviewed compared to other summons.
– maximum proportion of one given unit (currently 20%)
– change research priorities (lower CP upgrade priority and increase Empire Upgrade priority for Warlord and Dreadnought)
– change building priorities (including for units: BuildFrequency)
– change hero upgrade priorities
– remove Dispel for AI (to avoid Dispel spams)
– upgrade the AI tactical (defense, resistance) bonus for Strong and Very Strong Defenders (require a mod by strength though)
– delay research of the Disjunction spell a bit and its cost on every spell to prevent the AI spamming it like crazy, yet increase its effectiveness a little to counter the ease of reinforcing spells
– boost buildings’ bonus because the AI builds most of them

Tactical AI
– reduce obstacle damage (e.g. of Fireball to avoid the AI using it on a Wooden Wall instead of units)
Die to Unit Score Penalty (value the AI adds to target evaluation scores if the actor will die attacking a target unit)
– priority of some spells like: Call Ancestral Spirit, Summon Siege Engine which do not seem to be used

AI boosts
– hero upgrade with XP boosts for AI heroes
– Avatar skills “Free for AI” and “Research Type” – never (cannot be obtained by players)
– sneaky healing
– starting army boosts
– income boosts



The stuff we want to edit and potential test environments:

Choice of target and abilities by individual units

AI01
– moving near a unit and taking an attack of opportunity by moving to an adjacent hex while engaged to try to flank the enemy… because 1/ you do not flank it when you do that, and 2/ you take an attack of opportunity!!! It’s ok to try this kind of movement to attack a 2nd unit but not if you want to flank the unit you move near to
SOLUTION: Decrease the valuation of flanking if it’s possible. Or increase very slightly the valuation of damage taken?

TEST ENVIRONMENT: I don’t know, that’s very hard to reproduce, we should try to get a save game and a video when that happens.

AI02
– Casting Slayer’s Doubt (or Stiffen Limb) or any damage spells (e.g. Root Spears) on a Settler (or Builder for that matter): it’s not going to attack you anyway!

List of spells:
Dispel
Root Spears
Hornet Swarm
Flash Bang
Force Field
Weapon Kit
Quick Dash
Rain of Poison Blades
Blind
Panic Attack
Cunning Escape
Moving Target
Shadow Form
Magic Fist
Star Blades
Sphere of Protection
Chain Lightning
Harmonizing Energy
Cosmic Spray
Static Sphere
Slayer's Doubt
Smite
Divine Protection
Instant Wrath
Mighty Meek
Rebirth
Last Stand
Lion's Courage
Berserk
Shout of Intimidation
Phoenix Warrior
Killing Spree
Steadfast Ward
Suffocate
Seeker Enchantment
Haste
Bless
Holy Cure
Resurrect
Killer Instinct
Disintegrate
Stoning
Stone Skin
Slow
Fire Ball
Skin of Oil
Fire Halo
Vengeful Frost
Frost Missile
Shock Missile
True Resurrect
Warp Equipment
Degenerate
Death Ray
Stiffen Limbs
Syphon Life
Safeguard
Aura of Inspiration
Shield of Light
Black Lightning
SOLUTION: Remove Settlers and Builders from the list of valid targets (just like Undead can’t be affected by some spells).

TEST ENVIRONMENT: player A has a Settler and a Builder. Player B has all the spells: Slayer's Doubt, Stiffen Limbs, Root Spears, Holy Cure, etc. and a unit, for instance a Marauder. Player B attacks player A: if the spells are not used, then it is solved.

AI03
– heroes (and other units) use Healing or other healing abilities in a very untimely and unwise manner, very often opening their flank to enemies (like: they move IN FRONT of their ally and literally open their back to their enemies). Two issues here: 1/ healing abilities should receive a lower priority because sometimes the AI prefers to heal rather than attack, even when it could lead to a kill, 2/ the movement should be more clever, to avoid turning your back to enemy units

The point 1/ should be do-able, but need test to see the result.

TEST ENVIRONMENT: first a preparatory fight to damage one of your unit. Then the real fight vs 1 Reanimator. Keep your injured unit just out of range at the beginning, then hit the Reanimator for about 20 HP and get your injured unit at range where it could be killed. In theory, without the patch, the Reanimator should heal itself.
==> the test map should for instance have 2 human hotseat players so that you can hurt yourself in a controlled environment + 1 independent structure with 1 Reanimator
=> this was tested and didn't work: http://aow.triumph.net/forums/topic...o-combat-and-that-would-need-fix/#post-264449

AI04
– cast Fire Ball repeatedly on walls in siege battles even after one breach was made (casting Fire Balls on walls is a waste of mana overall but it’s even more so when a breach has been made; in my case, it started casting Fire Balls immediately after having cast Blessing of Health, whereas it should have cast Holy War first, as it’s much more useful on 10+ attacking Devouts)
SOLUTION: Motasa already implemented that, see http://aow.triumph.net/forums/topic...ined-by-extremely-poor-ai/page/4/#post-264438
Solution 2 would be to split Fireball into 2 spells, one for obstacles and one for unit, and prevent AI from using the obstacle one.

TEST ENVIRONMENT: city with Wooden Walls, siege with a Leader with Blessing of Health, Holy War, Fireball and many CP and let’s say 5 Cavalry vs 4 Human Archers, 4 Human Longswordsman. Check if the AI does cast Fireball on walls.

AI05
the AI never uses Repair Fortification
SOLUTION: Should be easy to change. But then it will cast it vs Flying units… :S
TEST ENVIRONMENT: city with Leader in, Repair Fortification only. Attack the city with some Wall Crushing units like Trolls.

AI06
– Dispel (with the Leader’s CP from outside the battlefield) Stiffen Limb BEFORE using Break Control on it (it should check if a unit in range can do Break Control, or Break Control should have a higher “initiave” than Dispel, which means units with it act first)
SOLUTION: See if we can raise Break Control’s priority to extremely high. Another option is to prevent AI from using Dispel entirely, might be a good idea, as Motasa did.
TEST ENVIRONMENT: AI Leader with Dispel, 1 Mystic. You attack with a Necro with Stiffen Limb and some units (to absorb damage, e.g. Trolls), cast Stiffen Limb on the Leader on turn 1. Check that it does Dispel it before Breaking Control.

AI07
Cast Chant of Unlife, Greater Reawakening, Slayer's Doubt and Stiffen Limbs in a 1vs1 battle
SOLUTION: make it excluded for 1vs1
TEST ENVIRONMENT: 1 unit on each side, a lot of CP and only the spell to test in the spell book of each player.

AI08
The AI does not cast summon spells in auto:
– Call Beast Hordes (should definitely be used as there is no “target” hex to choose)
– Call Ancestral Spirits or Summon Siege Engine (probably because the AI would not know WHERE to cast it?)
SOLUTION: activate Call Beast Hordes for AI. Test activating the other 2.
TEST ENVIRONMENT: big battles with a lot of CP and only the spell to test in the spell book of each player.

Stuff already done
DreadReapr did a lot of changes to tactical AI in his mod, see his changelog.
 
Last edited:
Results of investigations so far:

AI01:
Not investigated.

AI02:
Was not able to reproduce Settlers or Builders being targeted. But easy to fix if it happens: Laborer can be added to the list of forbidden requisites.
EDIT: I was able to reproduce a Builder targeted by Poison Rain, so we'll work on that too /EDIT

AI03:
Not investigated.

AI04:
Reproduced but not sure what settings to change to fix it. Is it "Wall Damage Score Mult" in the global settings? I contacted Motasa.

AI05:
The AI is already allowed to use it (and by the way, it's a really shitty spell, healing only 1 hex). There doesn't seem to be any AI score multiplier for Repair Fortification so I don't see any way to change the AI behaviour.

AI06:
Not investigated.

AI07:
Chant of Unlife and other battlefield-wide spells cannot use "TacticalUnit Effect: Property" Effect with their Targeter, so they can't access the "AI Unit Count Filter" (see the Wikia) so no way to do that.
It is possible to change spells like Stiffen Limbs and Slayer's Doubt so that they're not used in 1vs1. We can make them used only if there are multiple enemies.

AI08:
Not investigated.


So we're going to focus on AI07 and improving the AI filters for spells like Stiffen Limbs and Slayer's Doubt... and some of the changes proposed by DreadReapr in his mod.

Any opinions on these:
AI09
-AI will now cast the following spells in auto combat: Great Immolation, Condemn Killing, Divine Protection, Killing Spree, Dampening Field, Sadism, Gift Of Nekron, Rite Of Malediction.
-AI will not no longer cast Destabilized Mana Core in auto combat

AI10
-AI will now try to dispel the effect of the following spells: Skin Of Oil, Slayers doubt, Divine Protection, Last Stand, Lion Courage, Killing Spree, Star Blade, Sphere Of Protection, Killer Instinct.
-AI will no longer try to dispel the effects of the following spells: Cardinal Culling, Healing Essense, Bolster, Condem Killing

AI11
-AI Moral Filter
(if>0 the unit must have at least this moral, if <0 the unit must have lower than this, if=0 no moral filter)

War Anthem: 0 (was 200)
Killer Instinct :0 (was 400)

AI12
-AI Mode
(the mode which ai use deciding how to target)

Last Stand, Savage Rage, Rust Strike, Moving Target, Shadow Form, Star Blade, Lion Courage, Overload, Aura Of Light: most dangerous unit (was any unit)

AI13
-AI Range Filter

Slayers Doubt, Shadow Form, Star Blade, Stiffen Limbs, Aura Of Light: melee units only (was all units)
Flash Bang: ranged units only (was all units)

EDIT:

AI14
The AI tries to dispel Iron Heart from enemy units in big battle where it could better spend its mana, CP and Leader action (Leader is present).

SOLUTION: decrease the AI score value of Dispel?

EDIT2:

AI15
AI lets itself be killed in siege by an AD with Call Lightning, without getting out of the wall to attack the AD.

SOLUTION: set "force defenders to get out of the gates in siege" parameter to "yes" for Call Lightning like for Great Stoning (though not sure abilities have this parameter, spells have it).
 
Last edited:
A first version of a Smart AI mod has been completed (focusing exclusively on tactical AI for now) and will undergo tests:
Great Immolation – Ai ignore: true -> false

Bless Effect – Ai mode: any -> Most dangerous

Holy Cure Targeter – forbidden requisite: laborer

Dampening Field Spell - Ai ignore: true -> false

Condemn Killing Spell – Ai ignore: true -> false
Condemn Killing Curse – Ai allow dispel: true -> false (suggest to change to physical debuff, so player can’t dispel too)

Killer Instinct Effect - Ai allow dispel: false -> true
Killer Instinct Effect – Ai morale filter: 400 -> 0

Disintegrate Unit Targeter – forbidden requisite: laborer

Stone Skin Effect - Ai allow dispel: false -> true
Stone Skin Effect – Ai mode: any -> Most dangerous
Stone Skin Effect – Ai range filter: All units -> Only Melee Units

Fireball Obstacle Targeter – Ignore doors as defender: false -> true

Skin of Oil Debuff Effect - Ai allow dispel: false -> true

Fire Halo Effect - Ai range filter: All units -> Only Melee Units

Slayers Doubt Effect - Ai mode: any -> Most dangerous
Slayers Doubt Effect – Ai unit counter filter: Disabled -> Need multiple enemies
Slayers Doubt Effect - Ai range filter: All units -> Only Melee Units
Slayers Doubt Effect - - Ai allow dispel: false -> true

Divine Protection Spell - Ai ignore: true -> false
Divine Protection Spell - Ai allow dispel: false -> true

Power of the Word Effect Immobilized - Ai unit counter filter: Disabled -> Need multiple enemies

Last Stand Effect - Ai allow dispel: false -> true
Last Stand Effect - Ai range filter: All units -> Only Melee Units
Last Stand Effect - Ai mode: any -> Most dangerous

Stead Fast Ward Effect - Ai range filter: All units -> Only Melee Units

Lions Courage Effect - Ai allow dispel: false -> true
Lions Courage Effect - Ai mode: any -> Most dangerous

Killing Spree Spell - Ai ignore: true -> false
Killing Spree Effect - Ai range filter: All units -> Only Melee Units
Killing Spree Effect - Ai allow dispel: false -> true

Star Blades Effect - Ai allow dispel: false -> true
Star Blades Effect - Ai range filter: All units -> Only Melee Units
Sphere of Protection Effect - Ai allow dispel: false -> true
Sphere of Protection Effect - Ai range filter: All units -> Only Melee Units

Stiffen Limbs Effect - Ai unit counter filter: Disabled -> Need multiple enemies
Stiffen Limbs Effect - Ai range filter: All units -> Only Melee Units

Sadism Spell - Ai ignore: true -> false

Gift of Nekron Spell - Ai ignore: true -> false

Rite of Malediction Spell - Ai ignore: true -> false

Destabilized Mana Core Spell - Ai ignore: false -> true

Exploit Weakness Unit Property Effect - Ai allow dispel: true -> false (suggest to change to physical debuff, so player can’t dispel too)

Absorb Essence Friendly Unit Happiness Effect - Ai allow dispel: true -> false (suggest to change to physical debuff, so player can’t dispel too)

Bolster Effect - Ai allow dispel: true -> false (suggest to change to physical debuff, so player can’t dispel too)

War Anthem Effect – Ai morale filter: 400 -> 0

Savage Rage Effect - Ai mode: any -> Most dangerous

Rust Strike Effect - Ai mode: any -> Most dangerous
Rust Strike Effect - Ai allow dispel: true -> false (it’s physical debuff and can’t dispelled anyway)
Rust Strike Armored Effect - Ai mode: any -> Most dangerous

Moving Target Effect - Ai mode: any -> Most dangerous

Shadow Form Effect - Ai mode: any -> Most dangerous
Shadow Form Effect - Ai range filter: All units -> Only Melee Units

Overload Stun Effect - Ai mode: any -> Most dangerous

Aura of Light Effect - Ai mode: any -> Most dangerous
Aura of Light Effect - Ai range filter: All units -> Only Melee Units

Weakening Touch Effect - Ai mode: any -> Most dangerous

Mark Blood Sacrifice Effect - Ai allow dispel: true -> false (it’s physical debuff and can’t dispelled anyway)

Flash Bang Effect Blind - Ai range filter: All units -> Only Ranged Units



EDIT: among the changes above, all these are new ones from Zaskow:
Stone Skin Effect - Ai allow dispel: false -> true
Stone Skin Effect – Ai mode: any -> Most dangerous
Stone Skin Effect – Ai range filter: All units -> Only Melee Units

Fireball Obstacle Targeter – Ignore doors as defender: false -> true

Fire Halo Effect - Ai range filter: All units -> Only Melee Units

Power of the Word Effect Immobilized - Ai unit counter filter: Disabled -> Need multiple enemies

Last Stand Effect - Ai range filter: All units -> Only Melee Units

Stead Fast Ward Effect - Ai range filter: All units -> Only Melee Units


Killing Spree Effect - Ai range filter: All units -> Only Melee Units


Sphere of Protection Effect - Ai range filter: All units -> Only Melee Units

Rust Strike Effect - Ai allow dispel: true -> false (it’s physical debuff and can’t dispelled anyway)



Weakening Touch Effect - Ai mode: any -> Most dangerous

Mark Blood Sacrifice Effect - Ai allow dispel: true -> false (it’s physical debuff and can’t dispelled anyway)

Slayers Doubt Effect - Ai mode: any -> Most dangerous



And these ones need to be implemented:
Stiffen Limb Cannot target Laborer
Root Spears Cannot target Laborer
All direct damage spells and other single target spells cannot target Laborer

Skin Of Oil AI will dispel

Star Blade AI mode is now Most dangerous unit (was any unit)
 
Last edited:
Sorry if I speak without knowledge but why limiting Slayer's Doubt and Stiffen Limbs to multiple enemies? Because they are deemed not valuable enough versus a single opponent, though their cost is little? Or because the A.I. can't cast them on the right moment? A demoralized or less armoured, single Troll is not wasted CP, I'd say. Likewise any slowed, single opponent is good when you have ranged units to deal with it.
 
Is it possible to inject some fuzziness in this game? (finally)

Like in most games of all those past years, it seems that the AI can't be programmed with a kind of fuzzy logic, making it quite predictable, provided you know the tables (which is not my case). It's kind of funny to think that we still play with pen-and-paper rules (and a bit more for the A.I.), whereas, even for big 7-stacks battles, the computing power could allow for more convoluted tactical decision makings, on the A.I.'s side. That said, I'm not an A.I. modder, only someone understanding how a scripted A.I. can be very, very predictable (and boring) if depending on too few parameters.

Would it be possible, instead of using binary flags (single enemy vs multiple opponents, melee vs ranged vs any, ...) to define percentiles of optimum behaviour and less optimum behaviour, up to having a boosted A.I. even committing errors (no need for that if it is feeble already)? I guess that all the various "priority" indicators could be seen like fuzziness generators if there was a real random trial on each time, and not only an optimization, deterministic process.

A quick example:
  • Current behaviour: this target gets the highest priority, so let it be the one chosen target, as the informed human player would guess.
  • Fuzzy behaviour: 80% chance to select expected target (as guessed by an informed human player), 10% chance to try and kill (one of) the most vulnerable enemy (even if this property was already acknowledged in the highest priority selection process), 5% chance to focus on the most potent enemy (even if this means death to the attacker), 5% chance to fumble this round's tactical behaviour (quitting melee, going melee for a mixed/range unit, not taking care of opportunistic attacks, ...). There could even be "cultural" modifiers, making Goblins more chaotic and less disciplined than Elves, for instance. (percentiles are purely for illustration)

Think about it when it comes to Healing: does the A.I. heal itself too early? Instead of lowering an ability's priority, could it be possible to set percentiles so that the current behaviour would only happen in 40% of the cases, while Healing would be used only when its effects are maximum in 20% of the cases, etc.

Given the turn-based nature of the combat, timers to prevent the A.I. from switching between behaviours at every second wouldn't be necessary. Although I'm not an amateur, this makes me think about a card game where the A.I. would have to draw an unknown card from a stack of available behaviours, on each round, after having evaluated the new situation, except that instead of being equal randomness, it would be guided by a percentile table akin to the current priority filters.
 
I am definetely against changing stead fast ward. Imagine you are fighting with a hero or a ranged unit only (stone giant? don't know if it counts as ranged unit) and there is no chance that the AI casts the spell. I don't like this idea.
 
A demoralized or less armoured, single Troll is not wasted CP, I'd say. Likewise any slowed, single opponent is good when you have ranged units to deal with it.
In the balance mod, both spells have time limitations and beside in auto, your ranged unit will move forward to range, then stay there and get killed 1 turn later. In auto, ranged units do not stay out of range to take advantage of a slower enemy units. So there is no gain in casting MP reducing spells in 1vs1.

Would it be possible, instead of using binary flags (single enemy vs multiple opponents, melee vs ranged vs any, ...) to define percentiles of optimum behaviour and less optimum behaviour, up to having a boosted A.I. even committing errors (no need for that if it is feeble already)?
No it's not possible to mod this. The AI has some randomness but we can't act on it the way you describe. Besides, this is off topic.
 
Imagine you are fighting with a hero or a ranged unit only (stone giant? don't know if it counts as ranged unit) and there is no chance that the AI casts the spell. I don't like this idea.

In truth we don't know how game describes Range and Melee units. Hero has melee and range, stone giant too. Also we don't if this limitation is strict or no. Hero/Leader should be considered as melee unit, probably, because its default attack is melee, not ranged.
 
We investigated AI07 with Zaskow and it seems like "AI unit counter filter is Need multiple enemies (was Disabled)" means more than 2 units are needed for the spell to be cast, so it does not seem to do what we wanted.

EDIT2: I made further tests and actually multiple enemies seem to start at 3, so it's almost what we wanted (I expected it to start at 2). The issue in previous tests seems to stem from two things:
- the Leader will not cast if it is in danger (e.g. Very Likely Defeat), even if the AI score, etc. incite him to cast.
- the AI score of Slayer's Doubt were too low (when I upped the HP multiplier to 10 from 0.5, it suddenly started casting, when the point above was not preventing casting) /EDIT2

EDIT:
Also, results of the investigation of the "AI Unit Health Mult"...

Slayer's Doubt has a AI Unit Health Mult of 0.5.
Stiffen Limbs has a AI Unit Health Mult of 0.7.

When a Leader with Slayer's Doubt is attacked, the result is:
- attacked by a Troll: Slayer's Doubt is cast
- attacked by a Crow: Slayer's Doubt is not cast (score should be 30*0.5=15 vs mana cost of 8)
- attacked by a Draconian Scout (35 HP): Slayer's Doubt is niot cast (score should be 35*0.5=17 vs mana cost of 8)

I don't get why Slayer's Doubt isn't cast. Conversely, Stiffen Limbs seem to be always cast. It makes sense given its higher multiplier that it's cast more often.
Maybe there is a further *0.5 coefficient somewhere? So the actual AI score for the Crow is 7 instead of 8?
Also, I set Spell Choosing Random Spread to 0 to prevent randomness from interfering.
 
Last edited:
With respect to change research priorities, I tweaked the Advanced Logistics skill:
- ai research priority: low -> high / Reason: High mobility is key imo and when AI doesnot research it in the game (which is often the case when priority is low) then AI is quite weak at it. Among other things, this changes makes it much harder for humans to chase AI-armies, and makes it easier for AI-armies to do surprise attacks.
- increased research cost to: 800->900 / Reason: Make it harder for human-players to research. AI at higher levels has more research, so for them this change is not very important.

With respect to Mobility, I also changed a few things for the Builder:
- increase cost of builder (not sure to what exactly)
- increase cost of building roads: Convert costs 5->8, Gold cost 5->8
- increase cost of building watch tower: 40 -> 60
Reason: make it harder for human-players to build roads in order to move quickly around the map. AI will not sufer by these changes. This change is especially impactful when there are no roads at the start of the game.

I also changed the Terraforming, making it harder for the human-players to research & use it (and thereby partly preventing early snowballing your economy):
- increase research cost of Terraformer skill: 140->180
- increase cost of Terraformer spells: mana: 12->18 (nb. the costs gold doesnot work)
 
Do you know that there's a mod, "Fortress Addition Addendum" that tries and adresses the case of the builder? Watchtowers and forts now cost 50% more (360 gold , from 240), and take more turns to develop, given there are 2 and 4 levels of building, respectively (instead of 1 and 2).

On the other hand, the investment is more fruitful, as they generate a very small base income, and founding an outpost from them grants a little vision range or domain bonus, on top of the walls.

https://steamcommunity.com/sharedfiles/filedetails/?id=1169198047
 
Last edited:
Do you know that there's a mod, "Fortress Addition Addendum" that tries and adresses the case of the builder? Watchtowers and forts now cost 50% more (360 gold , from 240), and take more turns to develop, given there are 2 and 4 levels of building, respectively (instead of 1 and 2).

On the other hand, the investment is more fruitful, as they generate a very small base income, and founding an outpost from them grants a little vision range or domain bonus, on top of the walls.

https://steamcommunity.com/sharedfiles/filedetails/?id=1169198047
Yes I know, thanks. I like the increased costs but not the income. I seek to make life more difficult for human player (which ofc is not the same as making AI smarter but I am interested in both)
 
I investigated a bit more the issue of absent or rare casting of summoning spells by the AI.

Call Ancestral Spirits
AI Ignore is set on "False" in vanilla.
Even with a very high Tactical AI value for the Effect (1000), the AI doesn't use it. I tried also to change the Targeter to "Ignore No Effect Target" to "No" (from "Yes") but it doesn't change anything. Even in battle vs 6 units, when the override forcing Leaders to cast spells should trigger, the AI didn't cast. I believe the "Magic - Tactical Position Effect: Summon Unit" type Effect cannot be used by the AI because it doesn't know where to use them.

Call Beast Hordes
AI Ignore is set on "False" in vanilla.
The AI uses it but only in big battles where the override forces it to do so (6 or more units for Leaders, 4 or more for Heroes, to be tested for heroes).
"Tactical AI value" of 1000 for the Auto-spell and the Effect Summon does not make the AI cast it when the battles are below the override threshold.
Also, the AI does not cast it even when above the override threshold if the Leader is alone or with only 1 unit. It may be because of the "cautious" parameters, I'm not clear about what's going on.
Conversely, if "Tactical AI value" is decreased below 51 (casting cost = 50 so 51 is the minimum to have [AI value]/[casting cost] > 1 as required by general settings), the AI does not cast the spell even if the override threshold is exceeded. So it's not a real override!...
 
A101 Not sure about this one. "Decrease the valuation of flanking if it’s possible. Or increase very slightly the valuation of damage taken?" Seems reasonable but not sure how it will be done or the unintended consequences
A102 "Remove Settlers and Builders from the list of valid targets (just like Undead can’t be affected by some spells)." Perfect, good change
A103 Is it possible that the healing unit can be programmed to NOT heal unless the unit being healed is below a certain threshold? such as 70%. ??
A 104 Fireballs on walls. As bad as it is seems best to just leave it alone. The AI failing to use fireball on a wall in a critical point in battle could be disastrous to human attacker
A105 I have never used repair fortification, there is always something more urgent needed for the hero.
A109-13 The AI is so incredibly stupid in using spells I question whether it would not be better to take all casting abilities away from heros!! If a hero uses range damage attacks only then the hero has much enhanced survivability. Sometimes white wash solutions are best as you don't end up with runaway cascading unintended consequences.
The single greatest change that could be made to the AI is that all units in an AI group (stack) have to stay within a couple hexes of a friendly unit (or within a few hexes of the most powerful unit in the group) and units never race off by themselves to chase a scout. Whether this is simple change I do not know.
 
For better testing, there is console command ''AI'' (no quotes) that makes your nation to be controlled by AI for a single turn and ''AUTOAI'' (no quotes) that AI takes over your kingdom