r/heroes3 • u/Confident-Work-5532 • 18h ago
How does AI decide where to move with flying creatures?


I am currently attempting a somewhat infamous fight of a crusader vs devil, and trying different options. However, devil's behavior in some of the situations perplexes me. I am not a novice in using more obscure tactics, but this is the first time I need to get a flying unit to step on a wall of fire. So, on the pic-1 we have the devil slowed, before it takes a turn. It has no reason going into the wall of fire - crusader will still reach it if it does, devil itself will still need extra 2 turns to get to the crusader if it does, AND the devil will still get damage - and normally AI tries to avoid standing in the wall of fire... except that's exactly what devil does on its turn on pic-2.
So, why does the devil do it? It has no benefit for AI, it doesn't get it in range to hit, it doesn't keep it out of crusader's range. I don't think knowing this will solve this battle for me, but it definitely would expand my knowledge on heroes 3 AI - which would be very welcome, as I found no information on it even in FizMig.
8
u/doto_Kalloway 17h ago
So, the fact that he's slowed messes up with the ai.
I think what he's trying to do is to move closer to you so that you can't reach him next turn, but he can the following. But he always prefers straight horizontal lines. Combined with the fact that there are two terrain obstacles in front, he does prefer to hide behind (maybe does he account for the fact you might get morale).
Now why does he chose the firewalled tiles? I think that's because the game tells him to go X tiles west. He's slowed so he can't reach it due to obstacles, and so he just moves the max amount he can in this direction, ending up in the fw.
I might be totally wrong : I don't have any code knowledge to back this up.