I think what attack type AI use should be based on weapon not unit. Each weapons should have different prioritizes ("this weapon is sniper rifle" or "this is shotgun").
This is sort of what I was thinking would be achieved by letting the AI know the basic range(s) of its weapons, instead of working with default values which may be rather different from the weapon properties (ex.: there are a lot of
autoRange: 20 weapons in Piratez, but the AI will not use autoshots with it unless they are within 4 tiles or the weapon only has autoshots, which is a missed opportunity). If you know your weapon has
snapRange: 7, you can pick aimed shots if you are further, which makes you use weapons more appropriately. No more trying to aim shot a shotgun from 20 tiles, or using snap shots with autocannons from 12.
But it seems like Dioxine wants some units to be clueless (I'm guessing an academician who's given a gun just because angry piratez showed up may not know how to properly use it) and some to have a clue (actual soldier/warrior/fighter types). But honestly, the tweaks I suggest are small and I don't think it deserves to be considered an alternate AI, which is why I was suggesting them as tweaks to the basic AI. But there could easily be a flag is
isWarrior: true that determines whether to use the potentially not great defaults, or to use the weapon's proper stats (and maybe intelligence/aggression too).