Ai40. Not bug. Neither of the required conditions for a stall tactic are present in that combat.
(higher movement speed than the attacker, invisibility with no detection, flight with no attack that can hit a flier)
How would move 2 shaman survive 25 turns against a move 3 hero? If they can't, why is this a problem? It's a lost battle either way.
AI42. Like I said, I know it's a good HUMAN strategy but the AI can't use it because the spearmen would block itself from moving their real armies.
I don't see how the strategy could be made expensive or less effective, that's how the game's core rules work. More battles = more spellcasting opportunities, always been that way and is one of the key defining features of the game. It's the same thing when you use 9 spearmen and attack one at a time to cast a doom bolt for each and kill an much larger army that way - just for the defending side.
AI43. Your notes are probably wrong. Raven is casting Aura of Majesty in the turn 104 save file and Sss'ra casts Tree in the turn 105 one. No one is casting Tree in the turn 133 and 134 files.
You'll need to post a save file where the wizard is currently casting the Tree spell (use Detect Magic) and has the "tree already cast" variable enabled by a previous instance of the spell.
I checked the code just in case but I see no way for the AI to cast Tree if it was already cast unless the bug is hidden somewhere among other spell types but I am using the spell ID constants instead of just the numbers so it's not really possible to have a typo like casting spell 215 instead of 214 as it has "STreeofKnowledge" instead of the number 215 and the same for all spells everywhere.
(January 15th, 2023, 23:54)Seravy Wrote: Ai40. Not bug. Neither of the required conditions for a stall tactic are present in that combat.
(higher movement speed than the attacker, invisibility with no detection, flight with no attack that can hit a flier)
How would move 2 shaman survive 25 turns against a move 3 hero? If they can't, why is this a problem? It's a lost battle either way.
AI42. Like I said, I know it's a good HUMAN strategy but the AI can't use it because the spearmen would block itself from moving their real armies.
I don't see how the strategy could be made expensive or less effective, that's how the game's core rules work. More battles = more spellcasting opportunities, always been that way and is one of the key defining features of the game. It's the same thing when you use 9 spearmen and attack one at a time to cast a doom bolt for each and kill an much larger army that way - just for the defending side.
AI40b. I created this thread for AI development. Not only for bug reports. I report AI weakness and coding opportunities for AI improvement here. I think 9 Troll Shamans with move 2 and Healing spell should try to spread out and walk as far as possible from each other and from the enemy. Then use heal and regeneration to prolong the battle. Never initiate melee. Against a solo unit with move 3, it may be enough for 25 turns.
AI42b. Yes. Making way for stacks of 9 and moving in an organized manner would be a lot of additional AI development and coding. Ideally, there should be an easy to setup AI1 vs AI2 tournament that would allow AI developers to experiment and see what works.
I have many ideas how to penalize solo spearmen strategy.
An easy to implement, easy to understand rule change idea to make solo spearmen strategy less overpowered, making the AI stronger, lower micromanagement, and prompt for more difficult decisions:
Every stack outside of town gets +1 gold upkeep cost at the end of every turn.
At least an option to have this rule would be nice.
I understand the historical reasons why we have the current rules. But at expert level, rule changes like this would make a lot of sense, especially since the AIs play by different rules than the humans and the AI's abilities will be very far from expert human abilities in the foreseeable future.
Quote:Against a solo unit with move 3, it may be enough for 25 turns.
I'd like some more conclusive than "may be enough", but I guess as long as it doesn't require a new AI mode and just triggers the existing stall strategy, that's fine, except, what is the trigger condition? Ideally something that guarantees the AI won't stall if they have a reasonable (or any) chance of dealing a relevant amount of damage - it's ok to stall if the AI can at least know their units are expected to survive (they are faster) but not so much if it just makes them easier to kill (attacker does not need to deal with the suppression effect of 8 units attacking at the same time)
As far as I remember, ranged units with no ammo left and very low melee attack already default to stalling regardless of the global stall decision. Trolls however have high melee attack and so most likely didn't trigger this condition.
Quote:Every stack outside of town gets +1 gold upkeep cost at the end of every turn.
That's an interesting idea, worth considering eventually. This would add gold maintenance cost to boats and fantastic creatures though, both of which shouldn't happen. And yes, you can do the spearmen tactic with Skeletons. (Or zombies, in fact this is what makes Zombie mastery so good)
I feel that cost is way to little to really stop the strategy though. Using it already assumes you have thousands of mana to burn on combat spells so a few hundred gold a turn is nothing.
Another problem I see is how it doesn't really change much. You can simply keep 3-4 spearmen on a single tile. It still acts a s a bait and will be attacked by enemy armies as long as they aren't powerful enough to directly attack your cities instead - and thus you can kill the enemy units before they group up into a stronger army. If a strong army rarely shows up anyway, you can still split up the spearmen onto separate tiles to surround your cities, pay the maintenance for the one turn it takes for the army to attack one of them and get destroyed by spells, and then move them back.
I think this might count as non-optimal behavior. So I'm attacking an all doom bat lair with a hero, a djinn and 7 tanky units (war mammoths and minotaurs). The idea is the tanks to protect the hero while Call Lightning and a Chain Lightning sword on the hero kill off the bats. The djinn is undead and there to cast Black Prayer and then just jump around.
What happened though was the bats didn't go for the hero behind the tanks. They just kept chasing the djinn, effectively doing nothing.
Not saying that if they had gone for the hero they had a chance to win, but at least they would have killed some tanks, and maybe get to the hero (who was quite weak) as heroes go.
Attached save. The hero is Deth Stryke, just attack the lair next to him.
“I'd like some more conclusive than "may be enough"”
In the save file my unit has melee 15, 50% to hit. 9 trolls have Armor 5, 4 figures, total of 20 HP each. Damage calculator estimated 6 damage from hero to Troll per melee. 0.009 damage from Troll unit to hero. That means 4 strikes, >=2 turns for hero to kill 1 troll. >=18 turns to kill 9 trolls without walking. 7 more turns would be easy for the trolls to last by simply walking away from the dwarf. For example, troll who was attacked moves away 2 tiles from hero, hero follows and can only strike once that turn. I have not even added their 9 Healing spells.
“I guess as long as it doesn't require a new AI mode”
OK, but of course there could be even better ones than now.
“just triggers the existing stall strategy, that's fine, except, what is the trigger condition?”
Easy 1st draft: Use damage calculator to estimate damage from unit to unit melee exchange. If Enemy is calculated to do >10 times the damage in melee exchange to the AI than AI would do to player then move away from that unit. Try to avoid melee. Never initiate.
“I feel that cost is way to little to really stop the strategy though.”
I don’t go by feelings. I go by large amount of hard data and rational considerations. I have plenty available on this topic. Also, I am not trying to stop this strategy. I am trying to make the AI stronger, the game deeper, prompting for more difficult decisions (as opposed to the current no brainer decision moving >500 units every turn one by one to obvious positions), and to lower micromanagement, eventually making the game more challenging and more fun for expert players. Based on my many games on Lunatic, I conclude that the solo unit strategy is a must. Not doing it is a great disadvantage to the player (vs current AI). Hence it needs discussion and change.
“Using it already assumes you have thousands of mana to burn on combat spells so a few hundred gold a turn is nothing.”
I disagree. In my game I have less that 1000 mana to be burned on combat spells per turn. I am in year 1518, have 34 towns, control < 10% of the map and I use all my mana and gold to support spell casting every turn for many years. I barely manage this way. I had to sell my artifacts and buildings, and I use my towns to make trade goods. I can no longer afford to build strong land units due to their high upkeep. If my 500 stacks would cost me 500 more gold per turn, I could not afford it. At this rate soon I will have 1,000 stacks to move per turn. Each turn takes me about 3 hours to play.
“Another problem I see is how it doesn't really change much.”
In my estimation it would change so much that the AIs would go up about 2 full levels with this rule change. Master would become Phantasm, Expert would become Lunatic, etc. And that would be a good thing.
“You can simply keep 3-4 spearmen on a single tile.”
That is almost never a good option. (Their fighting abilities do not improve much and would only improve probability that I can cast 2 spells in a battle instead of 1.) That requires a lot more time to build and move to position, and would add to the food cost.
“thus you can kill the enemy units before they group up into a stronger army”
The solo spearmen strategy’s primary objective is not to kill enemy units, but to build and extend the border around my country, so I can have unprotected cities, armies all in meaningful places and huge land where the AI simply does not go. Until Plane Shift at least.
“If a strong army rarely shows up anyway, you can still split up the spearmen onto separate tiles to surround your cities, pay the maintenance for the one turn it takes for the army to attack one of them and get destroyed by spells, and then move them back.”
This is a much weaker strategy than my above mentioned one. I would probably not want to play with this. Also, in my games, strong armies show up very often from all sides. Trying to protect cities is a wrong meta strategy. Better to protect a country. Similar in real life, btw. Wars had fronts, but there was logistic cost to send supplies to every part needed.
Quote:Easy 1st draft: Use damage calculator to estimate damage from unit to unit melee exchange. If Enemy is calculated to do >10 times the damage in melee exchange to the AI than AI would do to player then move away from that unit. Try to avoid melee. Never initiate.
So you're suggesting to make this an attack targeting decision instead of a global strategy decision?
"If enemy unit retaliation damage>10x own damage, mark target invalid for melee attack" ?
I don't think that works for the most important scenario when 9 units face one strong hero.
Let's say each unit can deal 3 damage but the hero can deal 41.
In this case attacking is the correct move - 18 attacks from the 9 units kills the hero and while the units mostly die in the process it's very well worth it (from the AI's perspective, who generally has no way to stop such a hero otherwise).
A pretty big problem I see with this formula is how heroes can easily do over 10x the damage of their own health.
Another problem is how it being a per-unit decision instead of global, the usual considerations don't apply such as never activating a stall strategy when a damage over time spell is in play. So literally all of those would need to be special cased into this as well.
It also literally says the faster the enemy can kill the AI units the more likely it is they try to stall. But the AI should not stall unless it's to their advantage so the units need to be expected to last at least 25 turns. Which assumes we have to consider all the AI units which means it can't really be a single unit based decision.
For the unit maintenance, you didn't respond to the key problem with the feature, that is, how do we handle units that didn't have and aren't supposed to have gold maintenance in the first place such as ships and skeletons?
That said I would like to point out I've never seen anyone play the way you do. I think it's way too tedious for most people to even consider it an option. So I'm not sure how many people if any would even use a score modifier to prevent playing that way especially when they can just choose not to play that way in the first place.
“So you're suggesting to make this an attack targeting decision instead of a global strategy decision?”
Yes. AI’s (including neutrals) melee attack targeting decision for now.
"If enemy unit retaliation damage>10x own damage, mark target invalid for melee attack" ?
Yes. For 1st draft. This can be improved later based on data.
“I don't think that works for the most important scenario when 9 units face one strong hero.
Let's say each unit can deal 3 damage but the hero can deal 41.
In this case attacking is the correct move - 18 attacks from the 9 units kills the hero and while the units mostly die in the process it's very well worth it (from the AI's perspective, who generally has no way to stop such a hero otherwise).”
There you go. So now we are discussing 2nd draft for this AI decision. This is how AI development should happen. I can refine many times to make this better and better. I just gave you a simple first draft. For a second draft I recommend AI also considering the HPs of the 2 units. Anything excess of that is cut down to the current HP. So If hero does 41 damage which is almost never btw and the AI unit only has 20 HP then consider it as 20 damage instead of 41. Then for third draft, AI also considers its own attack vs the enemy as a percentage of its HP. If AI melee can cause at least 10% to the enemy then go ahead anyway and melee regardless of the expected losses. Then we can design more and more drafts, but better to have some game data before we go too far.
“A pretty big problem I see with this formula is how heroes can easily do over 10x the damage of their own health.
Another problem is how it being a per-unit decision instead of global, the usual considerations don't apply such as never activating a stall strategy when a damage over time spell is in play. So literally all of those would need to be special cased into this as well.
It also literally says the faster the enemy can kill the AI units the more likely it is they try to stall. But the AI should not stall unless it's to their advantage so the units need to be expected to last at least 25 turns. Which assumes we have to consider all the AI units which means it can't really be a single unit based decision.”
I think all these can wait until more data arrives. Global melee decision for the whole diverse army is complex.
“never activating a stall strategy when a damage over time spell is in play”
Agreed. In that case go to melee anyway.
“For the unit maintenance, you didn't respond to the key problem with the feature, that is, how do we handle units that didn't have and aren't supposed to have gold maintenance in the first place such as ships and skeletons?”
I proposed out-of-town stack maintenance change, not unit.
I am leaning to require 1 gold maintenance for stacks even if solo ship stack. Need to balance the obvious advantage of having individual ships over having several in a stack for country border defense. For Summoned units I am leaning to not require gold maintenance, since it was very expensive to summon them in general: costs mana and used up overland casting skill. They are much more valuable than units built in towns. But that will make the Skeletons even stronger than now, so I propose to increase Skeleton casting cost to 50mana. Even without this rule change, Skeletons are an extremely strong spell now due to no upkeep. Way more useful than Hell Hounds for 40 mana that even require 1 mana upkeep.
“That said I would like to point out I've never seen anyone play the way you do. I think it's way too tedious for most people to even consider it an option. So I'm not sure how many people if any would even use a score modifier to prevent playing that way especially when they can just choose not to play that way in the first place.”
I understand that. Very tedious even for me. This game I started 3 months ago and I am not even half way in yet and I don't know if I will win or lose although it seems I am winning Arcanus.
But how many people have you seen who won 3 out of 7 games on Lunatic, fully random, even the starting spells are random, Underdeveloped Start, Plane of Water, No Trading, Monsters Gone Wild, Final War, and strictly no cheat load for any reason? Not even for a mouse slip or accidentally not killing a green 1 figure magician due to not seeing it hiding under a tree (which just happened to me effectively setting me back 2 years in my progress), etc. If there were many players and prestigious tournaments like in Chess and Go, then other expert players would likely develop similar strategies as me and that is time consuming to perform. If they don't do it, they would perform worse vs the current AI. Hence the game design itself should be improved. And the AI too.
The good news is that is seems to be super easy to implement this trivial rule change and adding it as a score modifier option.
This is by no means a criticism of this game. I stated many times before that I consider COM II the best computer game ever made.
I don’t care much about scores, since they are very misleading and need serious balancing, but of course better to have them than not. Just keep tuning those too over time based on data. I can give expert opinions on that too if you are interested, but to me that is low priority to work on.
For the record, I often skimp on city garrisons too, only reinforcing them when an enemy doomstack is nearby. I only put in some cavalry, a flying unit if possible, and some ranged attackers in them. Mobile defense stacks are much more effective at defending your empire as a whole, especially if you have good damage spells to support them. I suspect that this strategy is more common than is realized.