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

Create an account  

 
AI overland movement insecticide changes

I'm trying to dig out how AI overland movement changed and I'll meanwhile list what seems to be different from normal and insecticide here and what seems wrong in both.
Note that this is mostly speculation at the moment, it'll take a few games and many attempted changes to see if I was right on them.

Change 1
When the AI targets a fortress, if it is the player's the original multiplies the value of units there by 1.25. I would think it assumes the player plays better so the rating is higher. Insecticide instead divides it by 4. If the fortress is another AI's, there is no change in either version. This might be why the AI keeps sending 1-2 crappy units to attack my fully guarded fortress, come on, no one sends 2 nagas against 9 pikemen. But if the pikemen's value was cut to 1/4th...see the problem?
This change seems to also apply to attacking other towns.

Flaw 1
There is no check to see if the player has an Alliance or Wizard's Part. The AI still considers them valid targets, just cancels the attack when it would actually be done, probably the same way the player cancels it when "You have an alliance, are you sure you wish to attack" is asked. Which is bad because the unit will stay there and keep trying and failing instead of doing something useful.

Change 2
When there is a war, there is a multiplier of 7 in place, otherwise it is 1. I assume this is the priority of attacking that target. Fortresses multiply this value by 500, other targets by 50, 100 etc. However, In the original, war was a multiplier of 10, not 7.
So the AI will actually consider attacking those they are at war with only 7 times more important than non-war targets instead of 10 times. To be honest I think the higher the better, not the other way. If the AI is already at war with someone, attacking another wizard is not a smart idea.
Additionally, peaceful and lawful wizards should not consider attacking without a declaration of war at all, that's just not right.

Change 3
In the original there was a check that skipped a target if a certain variable related to that wizard was less than 3. I assume this might be a value of how much the wizard wants to attack that other wizard. In Insecticide this check is removed.
There is specific code what to do if this value is higher or lower than 3 so skipping the entire process if it was lower seems a bug that needed fixing for sure.
btw if this value is exactly 2, then non-player towns receive half the priority of player towns. The priority seems to be based on the amount of people and buildings in the target town in all cases, except the fortress which is a fixed 500.

After this, nodes, towers and other dungeons are considered, I didn't analyze this part much as I don't think there is anything wrong with how the AI attacks these, it seems to work well enough.

...to be continued when I find out more.
Reply

I got an answer for one of these from Serena's IDA files.

Quote:mov dx, 5 ; 20 x value of HP target ????
imul dx
mov cl, 2
shr ax, cl

In other words, he misread shr as shl and assumed this is *20 instead of *5/4. Oh well, it happens.
Reply

(October 26th, 2015, 16:57)Seravy Wrote: I got an answer for one of these from Serena's IDA files.

Quote:mov     dx, 5  ; 20 x value of HP target ????
imul    dx
mov     cl, 2
shr     ax, cl

In other words, he misread shr as shl and assumed this is *20 instead of *5/4. Oh well, it happens.

Which one?  rolleye
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply

This is the multiplier how strong the AI thinks the human fortress is defended.

Original is 5/4 so 125% meaning the AI will attack the fortress if 0.75*1.25*their army strength>=defending army strength.
Insecticide removed the *5 so the AI will attack if 0.75*0.25*their army strength>=defending army strength.

In other words, if you have 4 spearmen in your fortress, the AI need 3.75 to attack it in 1.31, but only 0.75 in insecticide. Since the AI works on an "attack if able, otherwise gather more troops" basis, this ensures they'll never get to building a larger army on that continent, one that can actually win the fight. Basically they attack with one fifth of the army they actually need.
Reply

Very interesting, thank you.

You made a great job with AI, now they give me an harder time on the field, but mainly the Diplomacy is really working for the first time!

BTW the change applies to other human town attacked?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply



Forum Jump: