I've been using tons of harpoons lately and i've noticed the ai tries to dogpile overloaded enemies harpoons. I like this behavior because they get many more kills with them than before. However they are frequently tricked into firing their harpoons through enemy PD to try and get the one frigate that's overloaded. Frustrating when my ships do it, and exploitable when i have many allies with good PD.
I suggest the firing ship more heavily takes into account how many intervening ships there are to the target.
I also suggest they are more reluctant to dogpile smaller ships because frequently main guns are sufficient to kill them.