Author Topic: Target Priorities and questions  (Read 1727 times)

Offline Janster

  • Newbie
  • *
  • Posts: 8
Target Priorities and questions
« on: June 06, 2009, 09:45:24 AM »
Well, I've had a few more battles against HARD AI with 7 bonus.

It's actually gone well this time, I have after a lot of experimentation, found that the best combo is cruisers with ceptors or similar to fend of angry close vampires. However, I have some questions regarding unit targeting and choices they do.

Say I'm attacked by vampire units, my cruiser, well tech 2 one has a solid bonus against vampires, but regardless of this, their target o'choice is enemy cruisers who they do not have a bonus against. This leads to some strange engagements where I'm litterally swarmed and I'm still attacking units way out in the field. Also this leads to massive overkill situations.  Also this I think goes for many other units, my lazor gatling dudes, also fire at enemy smaller ships, but this does not seem to be in any way connected with what their choice of targets should be.

What happens ,is that my 300 + cruisers, will mostly, hit other cruisers at long range, massively overkilling a single cruiser at a time, this leads to a whole world of inefficient shooting, as most of the shots vanish when the target is dead.
I can solve this with closing range, but then I end up with situations where I'm targeting enemy snipers at far range instead, loosing 300 + shots a round to and killing them 1 by 1.

Lastly, this has led me to using kiting as my main strategy for my cruisers, pulling them away from long range targets in order to deal with closer ones, however AI is strange here, he willl pursue me, to a point...which is fine, but then he will just sit then, when I have reached his 'end of engagement zone' leaving me to kill anything he has moved closer.
I would suggest he should pull his dudes back if possible here.

Oh last, uhm shields are really hard to get down, to the point of ridiculous, the bombers take them out quick, but they do so fast, they cannot realistically do anything when the shield has decent cover, this leads to having to chew them down the old fashion way, which literally takes ages, in the early game, this can be a bit tedious, I recommend no shields on AI until player has chance to 'gear' up imho, either that or beef up bomber survivability.
Anyway, just observations.

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,052
Re: Target Priorities and questions
« Reply #1 on: June 06, 2009, 01:57:53 PM »
Well, I've had a few more battles against HARD AI with 7 bonus.

It's actually gone well this time, I have after a lot of experimentation, found that the best combo is cruisers with ceptors or similar to fend of angry close vampires. However, I have some questions regarding unit targeting and choices they do.

Awesome, glad it's going well overall -- there are a lot of valid combos in there, and the best one tends to vary by the campaign since the mix of ships is always different.  But pairing cruisers, bombers, and fighters with another complementary ship type is almost always going to work reasonably well. Good sleuthing.  :)

Say I'm attacked by vampire units, my cruiser, well tech 2 one has a solid bonus against vampires, but regardless of this, their target o'choice is enemy cruisers who they do not have a bonus against.

Well, the Strong Against and Weak Against notations are not actually telling you about bonuses.  What that is telling you is the results of simulated engagements between equivalently sized groups of units (based on the ship caps -- so the simulation would be 10 bombers against 10 cruisers, 10 cruisers/bombers against maybe 3 or 4 vampires, or 10 cruisers/bombers against maybe 30 laser gatlings, based all on their relative pop caps).  The Strong/Weak Against tells you who would win such an engagement, and by how much.

The point of my explaining all that is that it really doesn't reflect the bonuses that ship types have against themselves, because 10 cruisers against 10 identical cruisers, all else being equal in the simulation, is going to result in probably one cruiser surviving by a tiny margin.  So what the Strong/Weak against is telling you is other ship types and what they are typically really good at killing or poor at killing, but that rarely includes any useful information about how they do against killing themselves (Snipers are one notable exception, because of the range issue they are often a great way to take out each other, and so in their case they show up as being both mildly Strong and Weak against themselves).

This leads to some strange engagements where I'm litterally swarmed and I'm still attacking units way out in the field. Also this leads to massive overkill situations.  Also this I think goes for many other units, my lazor gatling dudes, also fire at enemy smaller ships, but this does not seem to be in any way connected with what their choice of targets should be.

The overkill thing is a separate issue, that's something that resulted from another change later in the beta.  Thanks for bringing that to my attention, I had not realized what an issue that is with cruisers in particular (attention is so split a lot of times during battles that this is hard to see).  I will work on this issue for tonight's prerelease version, I have a good idea for a way to hopefully solve this particular issue so that cruisers will do a better job and avoid overkills.

What happens ,is that my 300 + cruisers, will mostly, hit other cruisers at long range, massively overkilling a single cruiser at a time, this leads to a whole world of inefficient shooting, as most of the shots vanish when the target is dead.
I can solve this with closing range, but then I end up with situations where I'm targeting enemy snipers at far range instead, loosing 300 + shots a round to and killing them 1 by 1.

With the overkill prevention, this should hopefully solve most of the issue.  However, I'd also like to explain how the ships do their auto-targeting, since you were wondering.  There are a variety of factors in there including how many other of your ships are already targeting each target (they try to spread their fire around, which in most cases will give the best result).  What you are seeing with the cruisers targeting other cruisers speaks to a specific part of that logic, though:  when auto-targeting, ships will prefer to shoot at ships with the highest max health (but also lowest current health) that they can do the most damage against.  Evidently with the mix of units on your particular battlefield there, your cruisers were able to do the most damage against the enemy cruisers, and/or the enemy cruisers had the highest max health out of the ships that your cruisers could do equal damage to (this in itself is overkill protection, so that your stronger ships don't one-shot kill little weak ships and way overdo it.  Instead they try to take out the strongest target that they can reasonably take out).

From the sounds of it, everything is working as it should except that all your cruisers are bunching up your shots too much on just a few targets (overkills).  Once I solve that issue (hopefully today), that battle should go a lot better for you, I imagine.  Thanks again for bringing this up.

Lastly, this has led me to using kiting as my main strategy for my cruisers, pulling them away from long range targets in order to deal with closer ones, however AI is strange here, he willl pursue me, to a point...which is fine, but then he will just sit then, when I have reached his 'end of engagement zone' leaving me to kill anything he has moved closer.
I would suggest he should pull his dudes back if possible here.

Oh, hmm, that's another good suggestion.  I'll have to look at this one more carefully, but I think I can cook something up for that.  Using decoys, drawing the AI out from its guard posts, etc, is definitely an effective tactic, so that's good that you are using that well.  But it also makes sense for the AI to retreat in this case when it's too far away, like you say.  I think I might be able to get that in place today, too, but we'll see.

Oh last, uhm shields are really hard to get down, to the point of ridiculous, the bombers take them out quick, but they do so fast, they cannot realistically do anything when the shield has decent cover, this leads to having to chew them down the old fashion way, which literally takes ages, in the early game, this can be a bit tedious, I recommend no shields on AI until player has chance to 'gear' up imho, either that or beef up bomber survivability.
Anyway, just observations.

The AI actually never builds force fields after the start of the game, they start there as part of the scenario, and it's up to you as to whether to pursue them early on in, or not.  A force field with a lot of guys under it can indeed be really hard to deal with using low-level tech. That might mean that you have to just leave it alone for a while and come back with Mark III bombers, which have a much higher range.

I just realized that the Mini Guide was a bit slim on tactics for dealing with well-defended force fields, so I've made some significant additions here.  There are several tactics in there that will work for you, depending on what kinds of technology you have available or opt to unlock.

Thanks for the suggestions!   These were some great ones.
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
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,504
Re: Target Priorities and questions
« Reply #2 on: June 06, 2009, 02:41:07 PM »
Quote
Well, the Strong Against and Weak Against notations are not actually telling you about bonuses.  What that is telling you is the results of simulated engagements between equivalently sized groups of units (based on the ship caps
Wow, I *completely* missed that point and thought it meant "ship type A does 99% more damage against ship type B" or "ship type A does 99% less damage against ship type B".  Needless to say, in the second case I assumed it was a waste of time trying to shoot A's guns against B.

Quote
There are a variety of factors in there including how many other of your ships are already targeting each target (they try to spread their fire around, which in most cases will give the best result).
That is much better than "all shoot at the same target until it's dead" for overkill reasons.  However, I've seen situations where I have something like 300 ships against 20 cruisers and my 300 group has enough firepower to kill 10 of the enemy cruisers in one go but instead they take all 20 down to half in the first salvo and kill them all in the second salvo.  The result is that the enemies get to do 50% more damage than they otherwise would.  This would be more intense when my side has, say, the firepower to take out 2 cruisers in one salvo but spreads it out instead leading to the enemy getting 200 shots instead of 20+18+16+14+12+10+8+6+4+2 = 110.

I haven't studied enough results to be sure what your algorithms are doing, but one thing to consider is the main goal of choosing what to shoot, is it:
1) do maximum numeric damage
or
2) reduce enemy attack strength by the maximum possible amount

In a model where the attack strength of a unit is modified by remaining health (say a cruiser with 10% health left does only 10% damage, or only 55% damage) those two agree more, but in most RTS's (including this one, right?) a unit with 1 HP left does just as much damage as one at full health.

One way of hitting goal 2 more is to have the algorithm consider not so much "how many friendlies are shooting at X already?" but rather "what is the expected damage of all friendly shots against X that are either scheduled or in the air?"  The algorithm could be set to ignore targets where expected damage exceeds 150% of target's remaining HP, or something like that.  Implementation wise to avoid yet another nested layer of loops you could keep an invisible "expected damage" stat on each ship and just increment that by a quick damage calc every time a shot is scheduled against that target.  Of course, there are problems you could run into (what happens if a scheduled shot doesn't happen or is destroyed in transit to target, etc), so I'm just curious to know how feasible you think it is.

Thanks,
Keith
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 x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,052
Re: Target Priorities and questions
« Reply #3 on: June 06, 2009, 02:51:00 PM »
Quote
Well, the Strong Against and Weak Against notations are not actually telling you about bonuses.  What that is telling you is the results of simulated engagements between equivalently sized groups of units (based on the ship caps
Wow, I *completely* missed that point and thought it meant "ship type A does 99% more damage against ship type B" or "ship type A does 99% less damage against ship type B".  Needless to say, in the second case I assumed it was a waste of time trying to shoot A's guns against B.

Ah, gotcha -- I've added it to my list to make this clearer in the tutorials.

However, I've seen situations where I have something like 300 ships against 20 cruisers and my 300 group has enough firepower to kill 10 of the enemy cruisers in one go but instead they take all 20 down to half in the first salvo and kill them all in the second salvo.  The result is that the enemies get to do 50% more damage than they otherwise would.  This would be more intense when my side has, say, the firepower to take out 2 cruisers in one salvo but spreads it out instead leading to the enemy getting 200 shots instead of 20+18+16+14+12+10+8+6+4+2 = 110.

Hmm, I have not seen this, and based on the way the code is I would be surprised to see this happening.  The ships have a preference to not bunch up their shots, but if there's nothing better then they should pile it on.  I'm elbow-deep in the targeting code for the moment with the other thing anyway, so I'll keep an eye out for that.

but in most RTS's (including this one, right?) a unit with 1 HP left does just as much damage as one at full health.

Yes.  How damaged a ship is has no effect on the strength of its weapons.

One way of hitting goal 2 more is to have the algorithm consider not so much "how many friendlies are shooting at X already?" but rather "what is the expected damage of all friendly shots against X that are either scheduled or in the air?"

Haha, yes, that's exactly what I'm already working on right now. :)

Of course, there are problems you could run into (what happens if a scheduled shot doesn't happen or is destroyed in transit to target, etc), so I'm just curious to know how feasible you think it is.

Shots always hit unless the target is prematurely destroyed, or leaves the current planet.  The shield hit calculations have already been made once the shots are in the air, so that vastly simplifies things.  If a shot is for some reason unable to hit the target, it removes the scheduled damage from its target so that other ships know to start shooting at it again.  At least, that's what I'm working on right now.
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 x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,052
Re: Target Priorities and questions
« Reply #4 on: June 06, 2009, 03:03:30 PM »
Okay, yeah, I've got this working now for the prerelease later tonight (still more testing, other features, needed).  What a huge difference this makes.  I had a savegame where I had 140 cruisers ranging from Mark II through IV, and just attacking a single command post with them I was routinely ending up with around 70 left.  I did it pretty much the same way every time.  With the new logic finished and in there, I wound up with around 130 remaining (although many were damaged, way more survived).

I'm really pleased with this, this would make the auto-targeting a lot better for longer-range ships.  So Keith, I'd suggest not doing much more in the way of analyzing what is there right now, because it's all going to be invalid after this next release, anyway.  If, in the next release, you still see your issue with ships not hitting the two targets in an appropriate way, let me know -- but I'm not seeing that with the build I'm looking at now.

Thanks guys!
Chris
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 x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,052
Re: Target Priorities and questions
« Reply #5 on: June 06, 2009, 04:36:48 PM »
Okay, the latest prerelease is now out with these changes:  http://arcengames.com/forums/index.php?topic=64.0
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!