I have heard of a formula where it is (sum of weapons)/(sum of defenses + HP left). The ship with the highest of that ratio will be primary target for the AI ship.
I don't know if that formula is true. If not, what is the real formula? Also, now that we have Zalon and Xalax stuff, how does that count in?