A dumb ass ogre or troll is not going to see that trap or firewall or acid cloud you put there.. he just wants to smash you. IF something gets in his way he'll just swing wildly.
Using tactics like getting aggro on the caster then just putting people in the way might be ok gameplay wise but it doesnt feel right.
If a big hulk cant get to his target he'll start swinging anyway whatever is there, icewall, body , buddy, nitro glycrine filled barrel etc.
Somthing smart will back off out of sight and wait maybe. rethink their attack path.
INTELLIGENCE: would be the key stat to whether or not somthing would do something "stupid", High int character care more about their own health, and may try to avoid running through acid clouds, fire walls and other things that might hurt them, they may get out of sight and wait for you to come to them before attacking.
high int characters would also target healers, casters and bards at range where possible. Dumb characters would attack whats closest to them if they dont have a target or what hurt them last.
WISDOM: then believe in themselves, they have bonuses to will saves because they are harder to disuade, they've been around a bit and know whats out there. Harder to con. Intimidate, diplomacy and Bluffs would work less of the time, they'd also less likely to be changed off their target by damage. But may well change targets if they're given the run around. (they're melee focused and havent got to swing at target in some time)
CHARISMA: wouldnt affect behaviour combat wise except possibly this: a charismatic character would probably care more for their fellows and would assist his buddies more with buff spells, fighting their target rather than his own one. nothing to do with alignment, but high charisma characters believe that their fellows is where their survival is.
A low charisma chararcter would be more of a loner, acting alone, more singleminded.
So you could have 2x identical cleric NPC's with the same spell lists, but the spell choices would be govered by their charisma stat.
with this way of doing it cast touch of idiocy or feeblemind may well change their AI as well.
Casting eagles splendor on your hireling may well make them care more about you