Author Topic: Target Selection priority  (Read 8355 times)

Offline Elestan

  • Full Member Mark II
  • ***
  • Posts: 158
Target Selection priority
« on: October 27, 2017, 05:51:09 pm »
Is there a description of the target selection algorithm anywhere?  I'm curious how the system weighs the priority of things like:

* Attacker's mutiplier vs. defender
* Defender's potential damage to attacker
* Range to target, and whether the attacker is in range of the defender
* Maximizing kills
* Minimizing overkill

(I know there's an option for setting the relative priority of the last two)

One suboptimal behavior I've observed is that long range units like snipers/cursed golem will sometimes get themselves killed by ignoring enemies that are in their face in favor of distant targets.  It seems like perhaps "Things that are in the process of killing me" should get a bit of a priority bump.
« Last Edit: October 27, 2017, 05:56:00 pm by Elestan »

Offline Toranth

  • Hero Member Mark III
  • *****
  • Posts: 1,244
Re: Target Selection priority
« Reply #1 on: October 30, 2017, 01:28:31 am »
If my memory serves me correctly, unless you focus fire on a specific unit or set a type priority, a unit will target:
1) A hostile unit in range
2) that does not already have lethal damage fired at it
3) that the firing unit can do the most damage to.

Units with multiple shots can split them amongst multiple targets to avoid overkill/wasting shots.

As far as I know, there is no consideration for what units are attacking the firing unit.  This is probably a good idea; otherwise it would be easily gamed by the human against AI units - flood a H/K with fighters and drones to get it to ignore other units, for example.

Offline Elestan

  • Full Member Mark II
  • ***
  • Posts: 158
Re: Target Selection priority
« Reply #2 on: October 30, 2017, 09:00:34 pm »
As far as I know, there is no consideration for what units are attacking the firing unit.  This is probably a good idea; otherwise it would be easily gamed by the human against AI units - flood a H/K with fighters and drones to get it to ignore other units, for example.

I was mainly thinking about the Player units' targeting algorithm, and how to minimize the need to micromanage their target selection.  Currently, the AI and the Player ships probably use the same algorithm, but I have a feeling that that might not be ideal:  The AI's units are usually interested in maximizing damage inflicted; the H/K doesn't really care if the fighters kill it, as long as it does as much damage as it can - the AI will just make more.  But because players have more limited resources, their units should place a higher priority on keeping themselves alive. 

In the example I encountered, a group of enemy ships spawned behind my lines while I was hacking, and started blowing up my sniper turrets.  The snipers could have killed the incoming ships, but instead ignored them until I noticed and manually targeted them.  If I hadn't noticed before the snipers lost critical mass, I'd have had to fly ships across the system to rescue them.
« Last Edit: October 31, 2017, 11:05:11 am by Elestan »