Yes, that's a good point which I can make relevant to the topic in question:
I H7, the combat AI varies in intelligence. Usually, it makes attacking my shooters a priority, which is good. Sometimes, though, for no apparent reason, it can leave shooters and go for something else, despite the fact that it could have inflicted lowered morale on my units if finishing off a stack (it makes no distinction between undead/construct opponents and regular ones), or despite the fact that choosing to continuing the attack on my shooters would mean less retaliation damage to itself.
Sometimes, an enemy hero will use Armageddon or Chain lightning and absolutely hammer my units, then it will suddenly do something stupid instead (such as casting Lightning burst on its own units) when it could have finished me off (despite having enough mana). I have lost battles this way, only to experience the AI behaving less cleverly when I try the "fight again" option.
In summary, the combat AI in H7 is periodically a real challenge, only to suddenly do something silly and let the side down. If it would consistently play at its best, it would actually be very good.
In War: Resolution, In Defeat: Defiance, In Victory: Magnanimity, In Peace: Goodwill.