The AI would have to count / weight the firepower on each side and know which side was strongest, amongst other problems. That'd be a real challenge
not really:
im using 8 directional (45deg arks) to determine the broadside domains
an array
float [direction 1-8][avarage range, firepower, reload total]
a single run calculation that cycles through a ships weapons and stores the data in the array (any weapon that covers the domains ark is added to field)
some kind of managment script for determining the "optimal" domain to point at the enemy/enemies:
curent facing,
time to turn,
reload state of the domain (a boolean [] array tracker would work here)
range to target
maybe a second array to handle long range weapons as a seperate array (for long/short range mixes ect)
feed that into a controller for ship manuverability and you are done
decent formation AIs:the hard bit, this is probably for a "chess master/admiral" level ai, not an individual ship ai tho