There's a similar topic talking about the AI of the skeleton archers, but this happens with EVERY AI I've encountered so far (I'm in the catacombs). I've decided it must be something to do with the AI's timers since it is MUCH more noticeable in the slower mobs like the Skeleton Centurions moving in formation. I'll put the explanation for how to duplicate this in spoiler tags, as it involves a slightly exploitative technique.
SpoilerShow
I noticed fairly early on that enemies come within mellee range as soon as their model enters the square directly ahead of the player, but they cannot attack until their walking/flying animation ends, unlike the player who can. This means that with careful timing you can land a hit or two and back away. I played about with the timing a bit and realised turning is faster than moving, so we move onto step two: open spaces, and this is where the hang occurs
This requires a minimum 2x2 area: you step to one side to place yourself at a diagonal to the enemy, and turn to face one of the squares he will step into. If he steps into the space you're looking at, take some swings (I can reliably manage 3, or 2 against spiders), and repeat. If he steps the other way, skip the attacks and repeat the move.
After you side-step away a few times the AI just seems to get confused somehow, and looks left, then right, over and over before finally picking a space. I've managed to test it against 2 AIs at once (which was bloody awkward), and the same issue is true - get them both at a diagonal after dodging about a bit and they suddenly go HURRR, and fall asleep for a bit
This requires a minimum 2x2 area: you step to one side to place yourself at a diagonal to the enemy, and turn to face one of the squares he will step into. If he steps into the space you're looking at, take some swings (I can reliably manage 3, or 2 against spiders), and repeat. If he steps the other way, skip the attacks and repeat the move.
After you side-step away a few times the AI just seems to get confused somehow, and looks left, then right, over and over before finally picking a space. I've managed to test it against 2 AIs at once (which was bloody awkward), and the same issue is true - get them both at a diagonal after dodging about a bit and they suddenly go HURRR, and fall asleep for a bit