NeonSturm
StormMaker
But what I tried to say is: If the AI is too stupid to decide the proper action itself, it should watch the player's behaviour to define it's own.Retreating might be determined by the players attempt to get ground between it and the AI or distance in short. Countless states can be added and then they can be prioritized. Then they can be given different behavior patterns also. Such as one AI might heal first before attacking if he is really low in health another AI could be set to go berserk and just attack being close to death.
No AI however can actually tell what a players intent is. At least not.
If one human yawns, others around might yawn too.
The AI as opponent should act like a bubble of space dragging and pushing on the swarm of AI ships.
It also should have ranges of preferable and non-preferable weapon ranges and try to stay in one preferable range. But if the player tries to get into his preferable range (which is non-preferable to the enemy), the AI could make a sudden turn to skip that range and go into the next preferable one (think about electron orbits around an atom - they avoid the space between orbits).
Run if you can run. Go berserk if you can't run.
For piloted ships: attack if you can survive. You don't get anything from being a killing-machine, only from looting (when surviving).
For defence-drones: yes, they can go berserk, but only if they can do damage - if it is effective.