Author Topic: Unit targeting priority (Focus Fire & Strong/Weak Against)  (Read 1888 times)

Offline Vhorthex

  • Newbie Mark II
  • *
  • Posts: 19
Hello!

I was curious about something, unless i'm mistaken, it seems that when units encounter a large group of units 2 things happen:

#1 - The attacking group randomly attacks any of the units in the opposing group. (Units do not focus fire)

#2 - Units do not take into consideration their strenghts/weakness when "auto firing".

I was curious if this was as designed?

Is there anything about these 2 points? Existing functionality, special command?

To better illustrate the "problem", here is a quick example.


You are fighting a large group of enemies. Within that group hides 250 Mark III/IV Electric Shuttles. You attack the group with Fighters, Bombers & Planes (Randomly chosen lol). Although the fighters are best suited for defeating Electric shuttles (So are frigates, but this is just an example), they will not necessarily attack the Shuttles. They might engage another fighter, or even a frigate  (which it isn't "Strong" against).

Right now, I find myself forced to micromanage certain combats. When I see the example above happening, I manually select all my fighters... then go through the super fun process of right clicking on all the electric Shuttles. This is very long, tedious, and in MP games not necessarily welcomed :) Perhaps I'm taking this too far, and perhaps my example isn't the best to properly illustrate my "issue", but unless you don't micro-manage your ships in this situation you will get decimated.

Either because your units simply grind away at all the enemies simultaneously (no group focus fire), or they engage units for which they haven't been designed against.

I would just love to add a little more functionality to the "Patrol" and "Attack Move" commands. Since sometimes I look at what the ships start doing and i'm a little aghast; Like when I see Laser Gatling turrets bravely heading for en encounter with Electric Shuttles... (Electric shuttles can make 500 laser gatling turrets... VANISH in a matter of seconds.)

Anybody have any insight, tips or suggestions on how to deal with this? My MP buddies really hate it when I pause the game to set attack patterns lol.

Thanks in advance!

:)


Post Edit:

Having another poke at this "attack priority" I think it would make sense that units automatically target enemy units for which it is "Strong" against. For example, a soldier carying an anti-tank weapon wouldn't fire at the first enemy infantry he see, he'd wait for a tank. Nor would a WW2 bomber in a dogfight with a fighter plane, relying on it's tail gunner :S.

Please take in mind that I'm not a programmer, so I have no clue of the design/programing implications this type of "suggestion" would have. If it's utter madness, then I apologize, and my MP friends should just get used to my micromanagement! HA! :)
« Last Edit: May 03, 2010, 08:09:41 pm by Vhorthex »

Offline Sizzle

  • Full Member Mark II
  • ***
  • Posts: 189
Re: Unit attack priority (Focus Fire & Strong/Weak Against)
« Reply #1 on: May 03, 2010, 07:52:19 pm »
Based on all I've read the units should be more or less intelligently selecting their targets according to some weighted algorithm taking into account both what they're strong against and also what is the most threatening to them (to the blob?)

Is this behavior restricted to the AI or is this a possible case of the targeting messing up?  Also personally I put a pretty high danger weight to electric shuttles -- perhaps more than the algorithm does? I mean not many other units will wreck hundreds of ships at a go....   

Offline Vhorthex

  • Newbie Mark II
  • *
  • Posts: 19
Re: Unit attack priority (Focus Fire & Strong/Weak Against)
« Reply #2 on: May 03, 2010, 08:01:31 pm »
I added a bit of fluff at the end of my post, to try to push the idea that units should have a semblance of a "targeting priority".

I'm happy to hear that I'm not alone who dread the evil Electric Shuttles, I mean wow. I found them a little funny when they were in a small group. In the mid game, when he can have 150 of them stacked at a wormhole... uhhh... BE VEWY VEWY CAREFUL WABBIT!

As far as "focus fire" goes, I have to say I've NEVER seen any RTS have anything similar to "Focus Fire". So I'm guessing this is not something that is feasible. But dammit, it would be awesome! Maybe it's just my time playing MMO's that made me understand that it's better to eliminate DPS sources as quickly as possible, rather then simultaneously attacking them.

Anyways, I'll just say it AGAIN. This game is mind blowingly challenging, and there's always a little surprise around the corner. Sneaky AI!

:)

« Last Edit: May 03, 2010, 08:03:08 pm by Vhorthex »

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unit attack priority (Focus Fire & Strong/Weak Against)
« Reply #3 on: May 03, 2010, 08:14:00 pm »
Actually, it's wrong on both points.  The ships use an extremely sophisticated method for targeting enemy ships, although they do not use the strong/weak data.  Each ship tries to attack ships that it has the best chance of hitting at the present time, as well as that they can do the most damage to.  They also intentionally try to spread their attacks out more, as this tends to result in much better results than focus firing, which is wasteful of ammo, time spent switching targets, and so on.  Generally there are at max around 5 ships per target unless there is literally nothing better to attack.

Ships also do prioritization based on what is/isn't under force fields, and dozens of other factors.  You can override this by setting preferred target types for groups of ships if (for instance) you want to prioritize killing electric shuttles faster, but otherwise ships will act accordingly to what they can deal the most damage to the fastest, in their current ranges.  

To your example, a ship that has the highest strong/weak numbers for shuttles doesn't necessarily do the most damage to shuttles, and isn't necessarily faster at killing shuttles than anything else.  This is what the strong/weak data represents, and you'll notice that those are all monoculture battles.  Real battles tend to have more than just two opposing ship types, so the algorithm used there is different.  Ships don't worry about how fast enemy ships can kill them (which is accounted for in the strong/weak), but instead prioritize what they can kill fastest.  This actually makes far more sense when considering combined arms battles, because that way everyone does their part and as a group kills the enemy as fast as possible.

Now, that can lead to some situations where either one of the following is true:
1. None of your ships are particularly good at killing a dangerous kind of enemy ship, so it gets left to the last, inflicting more damage than you want.
2. Your ship mix is inappropriately matched to the enemy forces, and thus you take more damage than you should based on a lot of those sorts of inefficiencies.

In those cases, you may wish to fine-tune the way that groups of your ships target the enemies; the ships otherwise assume that you've done an effective job of managing your ship mix, but sometimes that isn't possible for whatever reason and you'll want to thus override their default choices of targets.  Simply by selecting your ships and then setting a specific attack target, the selected ships will then prefer to target that type of ship from then on (you'll see that when hovering over them).

Specifically, if you select an electric shuttle mark IV, they will prefer to shoot electric shuttle mark IVs, and then electric shuttles in general if there are no mark IVs around, and then whatever they would otherwise want to shoot at if there are no electric shuttles at all.  You can clear target preferences by using the Stop command (End), but otherwise specific ships will remember their target preferences until they die.  There isn't a way to make all ships that are built have a specific target preference; if your need to kill off a specific enemy type is that great, generally you're going to want to look carefully at your ship mix in the first place.

AI ships use a different algorithm for their primary attacks that simulates player choices but which is vastly more intensive, but for their autoattacking they use the exact same logic as the human ships.  The AI logic is the higher-function logic that basically is what replaces the human (you) that would be making choices on when to focus fire on something particularly large (like a command station or force field), when to retreat, and all of those sorts of strategic decisions that make up for them not being able to choose their ship mix (unlike human players).

When it comes to electric shuttles, I assume you're really referring to lightning turrets, which are what tend to be around wormholes that do so much damage.  If you're just sending through lots of little ships that are ill-equipped to face them, then that's a strategic mistake.  Better to send through a few lightning warheads of your own, or to send through a mix of ships that are specifically good at defeating lightning turrets, or whatever.  Then send in the little guys.  And generally speaking, it is suicide to use Free Roaming Defender mode on enemy planets, which would be the only reason that any of your ships would be running around outside your control -- expect to die if you use the defender mode on offense.  For good advice on offensive tactics, you might enjoy the tactics videos on the video tutorials page.

You can exert an immense amount of control over your fleet, but your fleet will never be as automated on offense as it can be on defense.  It's easier to use FRD mode and turrets on defense because you control the playing field and can set things up.  And, let's face it, if you had to babysit every single defensive encounter, you'd never be able to make any offensive moves.  So there is a lot of assisting AI in that area.  However, there is no assisting AI whatsoever for full-scale assaults -- the ships make the best choices in the areas that you set for them, but that's all tactics.  If you put them into a strategically bad situation, tactical decisions won't save them.  This is one of those places where the game isn't supposed to "play itself," in essence.  If offense were completely automated, the only thing really left for you to do would be logistics and economy.  There is no need to micro target selections in offensive battles -- good ship mix and general positioning is far more effective -- but offensive battles aren't something that are fire-and-forget in the same way that general defense can be.

Hope that helps!
« Last Edit: May 03, 2010, 08:31:48 pm by x4000 »
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Vhorthex

  • Newbie Mark II
  • *
  • Posts: 19
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #4 on: May 03, 2010, 08:18:43 pm »
:O

My wife just called me up for supper, so I can't read this right now. But, THANK YOU.

I will read this ASAP :D

Such a generous post!

Cheers!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #5 on: May 03, 2010, 08:33:12 pm »
My pleasure.  I just added it in three parts to the wiki, too, because they were good questions:

http://arcengames.com/mediawiki/index.php?title=AI_War_-_Why_Not_To_Use_FRD_Mode_Offensively

http://arcengames.com/mediawiki/index.php?title=AI_War_-_Preferred_Targets

http://arcengames.com/mediawiki/index.php?title=AI_War_-_Lightning_Turrets_And_Electric_Shuttles

There are so many topics out there, I try to add a few a week to the wiki as people as them.  Hope it's helpful!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

rubikscube

  • Guest
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #6 on: May 03, 2010, 08:35:25 pm »
wow, give you a 10 minute break and it's a 1000 word article or a new beta version :o

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #7 on: May 03, 2010, 08:37:19 pm »
We try! ;)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Sizzle

  • Full Member Mark II
  • ***
  • Posts: 189
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #8 on: May 03, 2010, 08:59:23 pm »
Chris thanks for the wall o text ;).   Perehaps you can explain some strange behavior I'm seeing in my current game. I've since kicked the AI off the planet (thank goodness) but owing to an error on my part (choosing my unlocks before seeing what units the AI had a liking for) I have found myself in a situation where it was exceedingly painful / expensive to dig myself out of. (read attrition warfare vs electric shuttles). 

There was a planet that was a good one to take in terms of resources. It had both a mass driver and ion cannon II on it.  It had a huge chunk of perma-mines at the entrance (entrenched ai) so I loaded up some transports softened it up some then unloaded a mobile builder and some engineers while the ion cannon was having a grand old time shooting my fleet.  I figured the ion cannon would rapidly help me kick the AI off the planet along with the mass driver.

My fleet unlocks to this point had been laser gatlings 2, bombers 2, some starships (which I didn't have with me due to another learning situation with the aforementioned mass driver).  AI has mixed anti armor and electric shuttle 3s. This of course is a horrible match up but at this point I don't have the extra unlocks to deal with the shuttles.   

Long story short,  there ensued a horrible war of attrition with me in the losing end until I finally managed to grind the AI away. I take control of the system and gain control of the mass driver and ion cannon.

Here starts the comedy of errors:

1) Because I have the FRD auto on on planets I control node built, my fleet scatters to the four winds. This occurs while I am briefly at the other end of my empire shoring up defenses for a wave that had been announced.  I come back to complete chaos watching electric shuttles eating Gatlings and fighter 1's and pretty much the rest of my fleet for lunch.

2) the ion cannon is busily shooting turrets on the far side of the system rather than the ai fleet that is eating my ships.  I had started a bunch of sniper turrets to help defend since I had run the transports toward the system edge to dump the builder -> colony ship -> command post. These started assisting the ion cannon in killing turrets on the far end of nowhere.

3)   Now since I had other ships in FRD that I didn't want to be un FRD'd by removing the control node I ended up wrestling with the FRD ai to keep my ships in a blob and focus down the shuttles that were raping me while leaving the system to fill up transports to get reinforcements past the perma mines, coming back to find the first set or reinforcements slaughtered cause I left the system, going to get more reinforcements. Wash rinse repeat a cycle or 10 and watch my hither to 145% kill to loss ratio wither to 90% or so over the  course of the next half hour or so.

I still don't have the knowledge to unlock fighter 2 or 3.  I'm going to have to K-raid just to get to something effective. 

Any reason the ion cannon was killing turrets at the back? The sniper turrets as well?  Now I realize I could have changed their preference.... I didn't know then.  Any other suggestions?   I don't blame you for laughing btw ;) 


Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #9 on: May 03, 2010, 09:18:33 pm »
My pleasure. :)

Well, generally speaking the auto-FRD node is not compatible with taking a planet before fully cleaning it off.  Of course that creates challenges when capturing ion cannons, but there's not a whole lot I can really do about that aside from what you were thinking -- destroy the node, etc.  That's a good example of a later-added convenience (the node) conflicting with some fairly-uncommon behaviors that had predated it (the capturing of a planet like that).

Generally ships don't have a preference for things that are further away, but ion cannons should default to hitting stuff that it can either insta-kill or should be able to disable the engines of.  Neither of those applies to turrets, I don't think, unless some turrets can be insta-killed (I can't recall).  What version are you playing on?  If it's the latest beta, you might want to report that so that Keith can look at it.  If it was an older version, you might want to use the latest beta, as we've done a ton of targeting changes (for the sake of efficiency and speed, moreso than added correctness, but added correctness was a small byproduct also in some cases).

I think I'd have switched the targeting preference of those turrts/ion cannons to be the shuttles, for sure, which would have solved most of those.  But beyond that, I'd have just built some smaller turrets near wormholes, as those absolutely destroy electric shuttles.  Shuttles aren't very frightening when basic/mlrs/laser/missile turrets are right around.

Usually I find ion cannons are more trouble than they are worth.  I just raid them with a transport and kill them as my first priority, then pop the command station early and let my defenses take the beating.  Then I finish the cleanup, and then I build my command station.  You don't have to do it that way, and there are tons of valid ways of accomplishing the same thing, but that way tends to be pretty fast and effective for me and my specific playstyle.  Check out some sections of the offensive category of the wiki for ideas on that sort of thing, if you're curious.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Sizzle

  • Full Member Mark II
  • ***
  • Posts: 189
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #10 on: May 03, 2010, 09:30:44 pm »
t'Was on the RC 1 beta. It certainly wasn't insta killing the turrets   More like slowly eating away at them. 

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #11 on: May 03, 2010, 09:31:59 pm »
Sounds like a bug for Keith to look at, then, if you don't mind reporting it.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #12 on: May 03, 2010, 09:40:43 pm »
Will look at the autotargeting there; if you could post a save that would be best for me to be able to find the problem and test whether I've actually fixed it.

As for the original post, Chris said pretty much everything I would have, but I would add that there are a couple of control nodes (one for infinite range ships, one for non-snipers) to make your ships use an alternate "focus fire" firing behavior.  The sniper-focus-fire one is more generally useful (at least in my view), as the non-sniper one may or may not give you what you want, but it's worth a shot.  The basis of the alternate behavior is to minimize the area under the enemy's damage-over-time curve, if you think of it as a graph.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Sizzle

  • Full Member Mark II
  • ***
  • Posts: 189
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #13 on: May 04, 2010, 12:37:43 am »
I'll see if I can attach the save tomorrow. Bear in mind the save is from *after* I duff myself out of the hole in the system.

Offline Vhorthex

  • Newbie Mark II
  • *
  • Posts: 19
Re: Unit targeting priority (Focus Fire & Strong/Weak Against)
« Reply #14 on: May 04, 2010, 06:54:50 pm »
Wowey!

That's quite the feedback! :D

Well thanks for proving me COMPLETELY WRONG :P

I experienced a tad last night with Focus Fire (node) and with ship preferences. Focus fire node is just... the best thing ever! As far as preferences go, I wasn't able to accurately 'see' it's effect in battle due to very short play session.

But focus fire nodes... godly. I mean I was just going insane watching my fleet pick all different opponents and equally attack all of them... :( Now they just go for the weeklings and boom!

Just a little question for 'preferred targets'. Can you have more then one? Or it simply overrides the previous 'preferred target' with the newly selected one?

THANK YOU AGAIN FOR YOUR OUT WORLDLY DEDICATION!

I work for a QA company, and we deal with many AAA title developers/publishers. If only they had 50% of your dedication, the world would be a better place. :)

Cheers!