How do AI ships choose what to attack in Nova?

I would like to know how an AI ship chooses its target in EV Nova.

I'm pretty sure that EV1 and EV2 AIs would latch onto whatever damaged them most recently, and I'm also pretty sure that EV3 is different. I have some ideas on how it might work, but I haven't tested them and I don't have time to these days. Anyone know about this?

In particular, I need to know about the following case:

An AI ship is being attacked by two other ships. It could be two other AI ships, or two of the player's escorts or fighters, or the player plus any one of the above. I don't know if that part matters. One of the attacking ships fires a 10-damage shot every 30 frames, and the other fires a 100-damage shot every 180 frames. This means the second ship is dealing damage faster (17 DPS vs. 10) but the first ship is dealing damage more often (60 per miunte vs. 10). In this scenario will the AI ship latch onto one to the exclusion of the other, and if so which one, or will it alternate between targets, and if so using what criteria?

Possbilities contributors to test:
Rate of fire
Rate of damage
Total cumulative damage
Total damage in last specific length of time
Absolute strength
Relative strength
Having a grapefruit depicted in the sprite

Hmmm.. a good question. That would require some testing which I'm too lazy to do right now.

But I've noticed this. If they're going hostile because of government hostilities, I think they will attack the ship highest strenght first as long as it is below the maximum odds for that goverment.

For example, let's say ship A, B and C meet in a system. Ship A is hostile to both B and C. Ship A has a strenght of 100, ship B has a strenght 50 and C 45. Let's say all the governments here have maximum combat odds of 2:1.

Situation: B & C are of the same govt. A vs B & C engage. A will engage B first. When B is destroyed it will engage C, which is probably going to run away at that point.

Let's say that this time, instead of being AI, ship C is you. A will engage both of you, but it will target B and look blue to you. If that was all, then you could pound at A without fear of retaliation. But that is not the case. A will hostile you if you shoot him and will target you as long as it's not distracted again by a certain amount of damage received. I have no idea what the exact formula is, but it seems it will change its target for whoever dealt damage the last time or something along those lines. That's why sometimes you see pirates and Feds duking it out, when you butt in to kick those pirates, chances are there are many Feds ships, but the enemy will hostile you sometimes, even if its just a second and shoot at you, even if you're using a single light blaster.

So, I think it might just be the last hostile ship to have dealt damage that becomes the target. Otherwise, it will pick the greatest threat first.

They appear to handle player escorts differently, though. I've noticed that the AI's behavior towards escort is rather weird. It seems to focus on you primarily, save if you cloaked. But sometimes for God knows the reason, they will attack your escorts, not just with crossfire that was intented to hit you. Hmm....

I agree, when you (the player) attacks an AI, that AI will attack you. If there are any other idle ships from the gov't, then they will also join in attacking you. But that only happens when a battle isn't already going on that is occupying the gov't you "attacked".Im making sense right? And that may be a little vague, but thats becuase i dont understand the 2:1 thingy thats described in EVNEW.

Isnt the point of an escort, is to protect you? (not counting the cargo carriers.) I mean, isnt the the definition of escort, is somethign or somebody escorting/guiding/protecting its master/employer? :huh:
So it would make sense if the escorts are attacked first, becuase they are a "barrier" between them and you.

BTW: Ive knoticed that an area cloak doesnt really cloak you escorts, but the enemies act as if they dont see them...usually. There are those random times that you cloaked escorts are just attacked inthe middle of a cloak.

The 2:1 odds refer to the numbers you put in the corresponding gov't combat odds. They are calculated by adding the strenght value of each individual ships allied together versus the value of each hostile ship. I said 2:1 but it can be anything really.

Here's an example: let's say you put a value of 50 in one gov't's combat odds. That means that will attack enemies as long as they are no less than 50% of the total strenght of their enemies. So, let's say that 50% gov't has a few ships whose added strenght give a total of 200. Then if those ships met a total strenght over 400 in hostile ships, they would flee. If they had a value of 200 in combat odds, then with 200 strenght they would flee if they met any more than 100 total hostile strenght. Etc.

That strenght I'm talking about is litterally the strenght value in the ship ressource. It's a rather abstract number that has to be adjusted correctly or it will lead to weird combat behavior. Why? Because like I said in my earlier post, I've noticed that when attacking each other, the AI tends to focus on the ship with the highest strenght value. That's why you'll notice that when a Fed carrier and a pirate carrier duke it out, often there will remain lots of fighters at the end. That's not always the case because they can be caught in the crossfire, but often you'll notice they really are firing at the carriers and it's just too bad for the fighters because they are in-between.

However, we'll also notice those carrier ships will react when fired at by those fighters. And that's where things start being weird. First, I'm pretty sure many have noticed the wierd movement they start taking when hit by multiple small ships? They tend to fly with some spontaneous random movements. That's because they keep changing their targets because of the damage they're taking.

So yeah, I believe there might be some more calculations behind all that, but overall, I'm fairly sure they aim for the strongest ship first in a hostile group, and when taking fire, they will go for the source of that damage. There could be some sort of timer. Example, for X frames after taking a hit, they will focus on that ship. However, if they do not receive anymore damage by the end of X frames, they will return to attacking the most threatening ship, the one with highest strenght value.

To test this, one might want to create a small plug with just one system, two gov't hostile to each other with like 1 in maximum odds so they won't flee unless there are a hundred times more strenght in the enemy team, basically making them next to fearless. Then make a few missions that make ships enter the system. Give those few ships so very clearly different strenght values, speeds and attack speed. But I'm too lazy right now.