Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
AI

(September 8th, 2016, 17:23)namad Wrote: Or they'll be an intentional human player cold war blockade, which is probably an intended feature/mechanic?
I would bet by the time the human player arranges 4-5 units to surround the shore tile, the settler already reached it. It's not like it's further than 2-3 moves usually. But yes, if they do it, it works. If anyone else steps on the shore tile it breaks the block though as it is no longer empty.
Reply

Realized the AI had another bug, it was unable to cast Disrupt on walls...or Crack's Call though that one goes on units 99% of the time anyway. No wonder walls worked so well against them...
Reply

In combat, when the AI is fighting only one unit, and the can cast a spell that will outright kill that unit (target not magic immune, doom bolt and target less than 11 hp, annihilate and target less than 7 (or 5) resistance, other direct damage and at least ... 80% chance of killing target), can that spell go to top priority? (If it's not already).

If you want to get fancy, you could check if all spell casters combined could kill the target (such as AI has 4 warlocks against a single great drake and AI knows doom bolt - throw 5 doom bolts at it immefdiately. ) but I suspect that would be very hard to code in.
Reply

(September 12th, 2016, 09:52)Nelphine Wrote: In combat, when the AI is fighting only one unit, and the can cast a spell that will outright kill that unit (target not magic immune, doom bolt and target less than 11 hp, annihilate and target less than 7 (or 5) resistance, other direct damage and at least ... 80% chance of killing target), can that spell go to top priority? (If it's not already).

If you want to get fancy, you could check if all spell casters combined could kill the target (such as AI has 4 warlocks against a single great drake and AI knows doom bolt - throw 5 doom bolts at it immefdiately. ) but I suspect that would be very hard to code in.

So you mean to add
If number of enemies=1 then {
if target unit hp<10 and spell = doom bolt then priority=100
}

The rest are...too complicated, effective resistance would need to be called, save modifier would need to be calculated, etc. as those are done at targeting, not at priority calculation, the two are separate.
So it's ultimately only for a single spell and in a situation when Doom Bolt already has a pretty high chance of being cast.

The idea is nice but the work needed to do this is too high for too small improvement.
Also, it's already done in a different way. The AI has these rules applied before calculating priorities for spells :
1. If number of enemy units =1, add 18 to all "A -direct damage" spell category modifiers.
2. If number of enemy units =2, add 12 to all "A -direct damage" spell category modifiers.
and they also have these
1. If number of own units =1, add 20 to all "E -summoning" spell category modifiers.
2. If number of own units =2, add 10 to all "E -summoning" spell category modifiers.
Reply

Ah, OK. Didn't know that rule was already there (my 2 sprites vs 9 things death game example)

I wasn't going to check save modifiers on annihilate, just current resistance, as my main concern is for the wizard, not heroes - heroes usually indicate multi unit battles.

And with the rules for direct damage you wouldn't need the rest. So, just doom bolt (100) and annihilate (99).
Reply

Quote:just current resistance
So if the unit has Bless and resist elements on it it'll still get targeted and fail repeatedly.
Current resistance unfortunately != effective resistance, as spells do not add to it. Also without the save modifier, you would need resistance 0 units to target them and still have a 100% chance and that's...very unlikely. At the very least you need to add the modifier of the spell being cast.
Reply

Oh sorry, yes I was going to include the default spell modifier.

Hadn't thought about bless and resist elements. Sigh. Yeah you'd need to include them. Whelp, if it's too much work, don't worry about it! Direct damage as is should be enough.
Reply

While working on fixing AI engineers that get stuck all the time, as a side effect it seems I managed to make stacks move towards the clicked target even if there are too many units there, but stop directly one tile before, very much like what happens when your stack is heading towards an enemy you clicked in an earlier turn. This will make the game so much more convenient, no more need to click next to a city if it already has units inside, you can just click on it and the units will go there and stop outside.
I just hope such a core change won't break anything else...

Also I expect this to improve the AI's efficiency in moving through towers somewhat, since stacks can't move towards the tower if another is already inside and changing planes. I think I already fixed all actual bugs where the AI tried to move towards an already used tile, but in case some are still remaining, at least the units will now get to move closer their destination anyway.
Reply

Found a nasty food bug that caused AI cities to fail to grow and shrink in size. Looks like all those small AI capitals were not caused by too much settler production.
When the game recalculates city data after any changes like reducing or increasing farmers, it checks for the minimal farmers needed to not starve and sets them. However it does that after calculating the food production for the turn. Unless the recalculation is done again, the correct number of farmers will still produce too low food and cause a population loss. The human player never notices because the game runs the recalculation for them every game tick, so it always runs many times before you get a chance to click next turn.
I wonder how much population was the AI losing through this.
Reply

A question. Should teleporting and merging AI units know where invisible units are? In case of the human player, a teleporting unit shows you the invisible enemies, because those tiles are marked unavailable for movement. Currently the AI is not taking advantage of this information.
Reply



Forum Jump: