As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
AI

Hum. So, I attack a node with a great wyrm defending. I have 9 unhurt identical units. How do we change the current formula so that it always attacks twice on the first turn? To me that's the biggest and most important case that needs to be fixed. Lots of other situations would be nice to be fixed, but not so glaringly obvious as that one.
Reply

It's already doing that.

Except if your "identical" units come up with different results for the expected damage outcome, the AI won't perceive them identical.

For example, let's say the Wyrm does 30 damage on average to the units. You have 3 identical units, each with 30 health.
The AI does the attack simulations. The results that come out are 29.2,29.8 and 30.3 damage.
The AI will attack the third unit because it will think the first two won't die to the attack but the last one will. Which would be the correct move IF the difference came from the third unit having 1 less armor than the others, but not if it just comes from unfortunate dice roll.
There isn't anything that can be done about it - aside from modifying the priority to pick the "will die" unit below the priority of picking the "nearby" one. Basically, "will die" currently is worth the same as if the damage output came up 5 higher. Which is great to tell apart that 2 armor swordsmen from that 4 armor one, but not so great if both have 4 armor.

This is the same phenomena that causes the AI to randomly switch targets if it expects dealing very low (less than 1) damage per attack - whichever enemy comes up above the threshold (for dealing nonzero, or dealing leathal damage) will be chosen over the others.

Note that this should ONLY apply if the damage output of the Wyrm is nearly equal to the health of the units. If it happens in any other case for truly identical units, that is probably a bug.
Reply

I'm not sure. This game has mostly been unicorns so they aren't one shotting things which is causing lots of hit point variations. That needs to solved but it's not as straight forward.

So in the case of the wyrm on the first turn, I don't want to do it based on I've attack. If that variation of 0.3 damage can cause it to switch targets, that's not helpful. Can you run the simulation 100 times? I'm assuming that's not possible. So, I think we need adjacent to be a bigger modifier than one shot, if the unit will not get to attack the one shot unit. 

Heck, not just adjacent.

Bleh. BLEH. Too many variables.
Reply

Can we change the expected damage to be if it comes within 10% of killing the target, count that as the simulation killing it?
Reply

(March 12th, 2018, 17:55)Nelphine Wrote: Can we change the expected damage to be if it comes within 10% of killing the target, count that as the simulation killing it?

Makes no difference, we'd get the exact same behavior, but now against units that have 90% of the health of the expected damage. Unless we remove the cutoff entirely or make it have a lower priority difference than distance, it won't help. But killing the unit we can should have a fairly large priority, or not?

Quote: Can you run the simulation 100 times? I'm assuming that's not possible.
It's running it 10 times. 100 would make the outcome have slightly less variance but borderline cases would still exist. Question is, how much slower that would make the AI's turn. I guess we can change to 20 and see if that makes things slower.

Quote:So, I think we need adjacent to be a bigger modifier than one shot, if the unit will not get to attack the one shot unit.

Heck, not just adjacent.

The AI looks at "reachable this turn", not "adjacent" so this is covered.

So let's say I change the priority of one shotting to +4 for +5, would that help? In theory if the damage output difference is exactly 1 on the simulation, that would still make it attack the "this turn" unit as 6>4+1.
However if there is anything else that can add that missing +1 the problem will come back.
Question is how often this would make the AI fail to deliver the killing blow, thinking "hey I can do 3 damage to that flying hero instead of killing this megabuffed halberdier with 3 health left - flying units and heroes are more important!".

Alternately we can raise the "attack reachable" priority by 1 but I rather not. Attacking the closest thing too often is the definition of a dumb AI.
Reply

Right, it's specifically on identical units I'm concerned with. Can we remove the simulation entirely if the target are the same? I assume it can't actually tell they're the same. If they have identical strategic value?



Also I didn't mean do damage equal to 90 of that required to kill - I mean give the 'killing blow' a range.

So if a unit had 30 hit points, if the simulation rolls 27+, it would think it had a 'killing blow' and give the bonus.

Basically by giving it a range, it would account for the most common variability in the simulation.


However, you're right that would just become a problem on things with 110% of the expected damage.
Reply

Quote:Can we remove the simulation entirely if the target are the same? I assume it can't actually tell they're the same. If they have identical strategic value?

A unit with Guardian Wind and Magic Immunity has the same value as one without. So no, we can't.

Anyway, here is the one with 1 less priority and 20 rolls instead of 10. Let me know if it helped.

.zip   Wizards.zip (Size: 380.47 KB / Downloads: 0)
Reply

If I have a decoy spearmen, likely to die to any spell, will it cause the AI to cast spells on it instead of useful units that will need 2 casts to destroy? What if it is troll spearman with lots of hp?
Reply

Probably not, I don't remember the exact details but the AI picks the target based on the amount of damage output expected on that target, and the value of that target. So it won't pick the spearmen unless the other targets would take too low damage from the spell.
It won't pick the Troll - targeting regenerating units has an additional priority penalty.
Reply

I've been wondering recently if the AI should be trading more with other AI.
As is they don't trade nowhere near as much as a human and there is the "trading is always good because even if it makes one player stronger, the other 3 don't benefit so trade with everyone to get 4 times the advantage as they do" thing which usually applies to the human, but far less to the AI.
That paired with the AI's fairly high chance of having a medicore amount of books, missing key spells, makes me think maybe they should trade more.
Also do note with all the difficulty changes, the time period between two diplomacy interactions on AIs is somewhat longer, especially the high difficulties. Which this is nice for reducing the pacts and alliances, it does do the same for trades, as does the reduction of the difficulty modifier in the roll itself.

In particular there are two numbers we can change :
1. The diplomacy roll needed to try a trade. This basically lowers the bar on how much relation two AI players need to talk to each other. (Not sure but I think currently they'll not trade below neutral, very rarely around neutral, and only near/during an alliance do they trade often. So moving this bar down by about 20 points might be a good idea.)
2. After the two AIs randomly picked a spell they could trade with the other, if the two spells have more than 7 trade value difference the trade fails. This is less than even a full tier of spells - trade values go from 0 (very bad common) to 55 (time stop) so a tier is about 14 wide. It might be far too narrow.
Reply



Forum Jump: