Loading...
  OR  Zero-K Name:    Password:   

AA micro targeting - Tactics

105 posts, 4298 views
Post comment
Filter:    Player:  
Page of 6 (105 records)
sort
12 years ago
I have been considering putting on additional tactical management for the AA micro widget in v0.4.

Currently, it will fire on the highest HP thing it can oneshot. If there is no such thing, or it will cause overkill, it targets the lowest hp out of the remaining targets.
Each tower will post its intended target and other towers will consider the target's effective hp to be lowered by the tower's per-shot damage.

This can definitely be improved. Suggestions are welcome.

Please keep in mind that radar dots' identities cannot be discerned. Yet. I'm working on that. =P Taking into account limited information is essential, you cannot assume the widget will know everything.

Some attention to CPU usage would be nice. I can't iterate over all possible target assignments. Although this is not such a concern, I try to think of ways to implement a targeting idea in a CPU friendly manner. That's my job as a coder after all!

--------------------------------------------


What I am considering adding is an attack stronger than lowest hp mechanism.
Eg. you have 3 hacksaws. A licho and 3 bombers fly into view. The hacksaws will just target the bombers instead of the licho since they one-shot bombers.

However, since each hacksaw considers its own attack independently of the others, I can only track attacks that have been decided or just launched by other towers (within refire delay).
For the hacksaws to correctly decide that they should cooperatively shoot the licho and take it down, they need to not only consider their own attack but other "potential" attacks from other towers, including sensing if the other hacksaws are ready to fire or not.

I have only a limited idea of how to do this. Any suggestions or refinements are welcome.

-------------------------------------------------

An another completely separate problem is the decoy planes problem.

There exists (with good reason) a tactic that involves sending air superiority fighters into heavy AA to draw fire away from bombers that then destroy the intended target. It also clears the space of fighters.

This tactic works on v0.3 AA micro. Any hacksaws and defenders will target the fighters first while the bombers are not yet in range since they don't detect bombers.

The problem here is this: How do you decide whether to shoot enemy fighters with heavy AA when there is no other target visible?
Remember you can't detect the bombers incoming since they haven't entered radar.
And they might not be there... the fighters could be chasing your fighters or gunships. Then you definitely want to use all AA you have.

Not to mention that bombers like the stiletto are radar invisible. This complicates matters massively, since the stiletto is definitely AA enemy #1 due to it removing shields and taking AA offline. But you can't see it and thus will be spending ammo on normal bombers that you see in radar as they approach. Or their fighter decoys...
Or sending bombers through a "corridor" of jammed radar. (athena, cloaky bot con, eraser) Then everything is invisible.

How do you solve this problem? As a player, if you had as much micro as you needed to control all your AA defences and consider all possible tactics, how would you approach this problem?

I have no idea. Any suggestions are highly welcome.
I don't expect solutions to be perfect. I don't think it's possible to counter air with AA turrets perfectly, and this is the way it was designed. Decoy maneuvers and whatever else you add in makes deciding the defense problem far more difficult than executing the attack.

The bombers will get through.

It's only a question of how many.
+0 / -0
12 years ago
"Or sending bombers through a "corridor" of jammed radar. (athena, cloaky bot con, eraser) Then everything is invisible."

O.o

If air player did micro that much to do this him i think him deserves to kill the target.

Off topic: would be nice if you could control the altitude of air units so you could try to do something like this wich a cloacked athena that too high to be uncloackded by land units... planes would not be invisible, would simples not have radar dots...
+0 / -0
12 years ago
Radar coverage is based on your ground position and the radar coverage of that spot on the ground. It's a cylinder IIRC.

Besides, if you could adjust the height of planes, precisions could just fly so high that nothing could touch them except for interceptors.

It'll make ground based AA useless except to gunships.
+0 / -0

12 years ago
Very nice optimization problem. This is about operations research.
I dont have answers, but lets see if I can help define the problem.

What you may want to optimize:
- maximize damage dealt to enemy units -> consider HP reduction for killed units
- minimize damage potential of enemy units -> prioritize shooting down incoming planes rather than those returning/having dropped their weapons, try to determine targets of incoming planes
- maximize dps of owns AA -> make sure your hacksaws do not wait too much for the "best target", thus reducing their efficiency
- maximize economic cost for attacker
- maximize for AA survivability/serviceability -> target stiletto first if coming toward AA, do not wait for the licho if precision bombers appear to target AA

These objectives are partially overlapping/not stricly conflicting, but I'm not sure it can be reduced to a single objective optimization problem, unless you pick one and forget about the other.

Considering the problem of cooperative/multi-AA optimization, unless your AA are clustered together (probably a bad idea!), you will probably have to compute trajectory of incoming airforce to see how trajectories intersect with AA ranges. At best, this is speculative and will consider straight trajectories. You may want to determine whether planes are microed or not and adapt to this. If they are not microed, you may try to optimize based on computed targets. If they are microed, you probably cant do much. But you could still introduce a non-deterministic parameter so enemy cant systematically use weaknesses in whatever algorithm is selected.

Common wisdom is, when you dont know what you are talking about, quote or refer to wikipedia. So here I go:
- http://en.wikipedia.org/wiki/Multiobjective_optimization
- http://en.wikipedia.org/wiki/Weapon_target_assignment_problem
You can also google for "Weapon target assignment problem", it returns interesting papers. However, it is more about how to optimize air raids than air defense. Still, references in these papers lead to more papers... so lets dig.

2 of these papers:
- http://www.dodccrp.org/events/10th_ICCRTS/CD/papers/182.pdf
- http://www.innovativescheduling.com/Files/Presentations/ConferencePresentation1.pdf
+0 / -0
12 years ago
Bah, high and fancy talk. Can't trust the things. =P

Currently, my idea for the hacksaw vs decoy planes problem is to simply remember that hacksaws don't dps planes very well. They overkill massively.

I think a simple way would be to split the AA defences into burst damage AA and continuous damage AA.

Hacksaws and Screamers go into burst damage.
Chainsaws, Razors and Flak go into continuous damage.
Defenders sit somewhere in the middle, but hacksaws ought to consider them continuous dps.

If there is X amount of continuous dps AA nearby a hacksaw (say within 1/2 max range of the hacksaw), it refuses to target air sup. fighters and light aircraft (hp < 700). You'll have to bait with a rapier or something, which the hacksaw barely one-hits.
+0 / -0
12 years ago
Sry, hacksaws don't one-shot rapiers. My bad.

Might have to add Firestorm into the exception list, so hacksaws will still blow those up. (its job is to shoot bombers, napalm bombers are not an exception despite being fragile)
+0 / -0
12 years ago
1. Make some ghost-units for each aircraft/AA, and let ALL AA fire at ALL aircrafts as long they are in range.

2. Set priorities of all killed targets.

3. Fire that the highest priority target dies, the second if possible, the third if possible.

Ignore units which doesn't get killed, unless some AA-Towers wouldn't kill units but can fire against them.

Maybe you want to fire only if
( fly at the borders
OR into the inner 50% of range AND are at 80% of the range of the first tower
)
That would ensure a bit more targets.
+0 / -0
12 years ago
http://code.google.com/p/zero-k/source/browse/trunk/mods/zk/LuaRules/Gadgets/unit_AA_micro_gadget.lua
Resurrect the post !!!

I don't understand why 2 statics get ignored partially at gadget:Initilize:
...
if wd.name:find("corflak") then
--Script.SetWatchWeapon(i,true)
...
if wd.name:find("corrazor") then
--Script.SetWatchWeapon(i,true)

It ignores mobile AA completely now.
It would be much better if we can issue commands to weapons directly and not only to units.
* Idle weapons use general unit orders or search for targets.
But the complete implemention of unit order queues is insufficient for this task.

If not earlier, now we got to a point where the old style of coding got too special.

Also I dislike how it is implemented as a gadget.
It should only use the units which are known to be air units (above ground level)

It aims to be much more efficient as even the human in front of it with infinite time for targeting could be.
+0 / -0
12 years ago
It would much easier to code a Screamer to use only 2 projectiles at once ( 3500 damage ).

* Use movement speed to dedect possible unit HP classes ( would be reliable this way ).

* Hit each target once with a chainsaw if possible to kill eventually some gnats or blastwings.

* If one or two random targets died - but not all, expect the whole swarm to be gnats.

* If gnats, calculate how many the screamer can hit with 1 missle.
* * Don't use screamers if you have flaks ( huge fire rate / aoe ) or enough mobile AA.

* If they are any other unit types, expect the whole swarm to be at least banshees.
* * Can you kill about 1.5 of them without too many losses ( only 1/3 ), don't use Screamer.

* If one survive more than 3 or 4 chainsaw shots and there is no flak or equal sized AA (units and turrets) you know that you have to use Screamer missles and that they do cost.

* If the enemy use anything but fighters ( die to 1, 2 or 3 shots ) only look at hacksaws or more than 7 MTs per incoming radar blip ( 7*200

1400

one killed shadow ).
* * don't count the third too delayed shot of MTs - unless there is no valueable target in front of them.

Don't think about razzors, MTs and short ranged AA too much if there are heavy Air units - they won't do much overkill.
Don't think about hacksaws, Screamer too much if there are spamy units - unless Screamer can hit more than one at a time.

I don't want a perfect AA widget - that would require a rebalance and suck too much CPU time.
I only wish we have a widget that ensures that Screamers makes at least 3 or 4 times cost with it's missles.

Don't forget the AOE of Flaks - especially against light, spamy units.

If defenders shots would be infinitly or the targeting widget handles them as they have infinite speed ( disables targets for 2 seconds and reenables them if they are not dead ), it would be sufficient.
+0 / -0
12 years ago
erm..... looks like there's too much to do! I think we should look at Sheep's link; maybe there's real world solution presented by engineers and scientist that could help with this problem. I'm sure in real world there's more limitation and they had to invent something clever & simple to get things done..

Should take a look!
+0 / -0
12 years ago
OMG... that's lots of math, and the paper is mark as un-classified (lol)! That is some real military stuff there (lol).
+0 / -0
12 years ago
Jseah gadget still better -_-
+0 / -0
12 years ago
Zzz, ideal assignment problems are not applicable to the gadget.

This is not an ideal scenario where all your towers can shoot all targets. If it were that simple, AA micro would be optimal for shots to kill count ratio now. Current code optimizes for number of downed enemy targets per shot. Next step is to maximize cost to enemy.

Detecting whether something is an air unit is easy btw. I don't need to use CPU expensive things like speed/height from ground. Just read the movetype from unit definition or look up the unitname against a list of known air units (which is current way, move type is a bit screwy for a reason I can't remember).

Assumptions: (and why they are false)
1. All towers can shoot (reload times are often staggered)
2. All towers can shoot all targets (targets are often distributed over the map in non-overlapping tower ranges)
3. All targets are in range and available to be shot by something (a bunch of air units enters AA range a few at a time, not all at once)

Furthermore, there are complications:
Detection of un-shootability (allied/terrain/enemy blocking) is difficult
Miss rate is unknown but definitely present and can only be determined empirically
Prediction of flight time depends on prediction of enemy movement which is non-trivial =)


So what we have is a continuous weapon assignment problem with non-equal reloads/rate of entry and with uneven target groups per tower, that contain unknown invalid targets.
With unknown miss rate and impossible to predict weapon flight time.

Thoroughly non-ideal.

Real world is even messier. I don't think abstract math papers are going to help.

I mean, I'd be happy to look at the computer programs for the AEGIS combat system and see how that assigns missiles and targets. That has been proven in real messy combat scenarios. So plainly it works.
Somehow, I doubt I'll get to see it though.
+0 / -0
12 years ago
Nubtron:
Weapon prediction for true DPS AA like flak and razor aren't needed. In fact, I don't even do target assignment for them. Those bits are just in there for completion and in case I want them later.
+0 / -0
12 years ago
Hey jseah. Hmm, I think those assignment papers are definitely overkill, given the amount of computing power you actually get to play with here. You would be the best person ever if you implemented something like AEGIS in spring, though.
+0 / -0
12 years ago
Target power considerations are next on the list.

Basically, this will target units with more cost over others. (eg. will try to shoot nearly dead rapiers over any hp gnats)

The proposed algorithm is as follows:
-------------------------------------------------------
Units have their hp for purposes of calculation reduced by incoming damage (projectiles in flight + other towers targeting). Ignore those less than 0

If possible to one-hit kill, then do it. Pick unittype with highest cost in list. Multiple highest cost targets that can be one-shotted pick highest current hp.

If not possible to one-hit kill, shoot unittype with lowest maxhp/cost. Multiple such unittypes pick lowest current hp.
-------------------------------------------------------

Would anyone like to provide an alternative?

For cooperative targeting, I have not yet worked out how to implement, save that I know posting potential damage of towers onto planes will be required. At least, it will be if I am not to use insane amounts of CPU.
+0 / -0
12 years ago
That sounds like a simulation (because the gadget need to calculate the outcome before it happen). This may be a good thing if you could make target assignment algorithm too, else this just took too much effort. For example: (without coop algo) every tower believe it can/cannnot get a 1 shot of the target, so then no tower or all tower will fire simultaneously, so you always need to do cooperative algorithm to prevent such thing...

The cooperative algorithm itself (I think) is quite hard. (As featured in the un-classified articles) you need to assign best weapon for each target and you need the gadget to test for every possible outcome for the best outcome before issuing any order. After selecting an outcome, then the gadget will need to issue order and fire the missiles, but then the process repeat again, and you may fire like 10 times per second again and this consume CPU power. Also this kind of system will make sense only if you have some source-code that we can borrow and not invent from scratch O_0

Maybe current gadget is enough?
+0 / -0
12 years ago
maybe there's Open-Source AEGIS missile defence system in SourceForge? :P
+0 / -0
12 years ago
The assumption I am making is that any tower can shoot any target within range. It will detect if the tower hasn't fired for some time (1/2 second) and then skip to next target.
I will need some way of prediction if unit can be fired upon if I am to do proper cooperative targeting.

Doing best possible combination cannot be done. At any point in time, any tower available to shoot will find that most other towers around it are at various states of reloading. Like I said, this is a dirty semi-real scenario, not abstract ideal mathematical problems.

Also, I don't need perfect answers. A simple to understand (and therefore simple to debug) heuristic will do. Take my current rules-based approach of if X then do Y; that's not perfect and there are some situations where it doesn't work properly.
(eg. An mt reloads, it fires on the only available target, a bomber and fails to kill it. Then a nearby hacksaw reloads and kills the bomber. MT wasted shots. )

But the majority of overkill cases aren't such specific problems. As long as I cover most of the major categories, and the default behaviour isn't too bad, that's a significant improvement for very little computation.
+0 / -0
To me, the very existence of this widget indicates that something is broken with the static-AA game. The Hacksaw practically demands a widget to be useful.

edit: edit works!
+0 / -0
Page of 6 (105 records)