Page 1 of 1

How player's units get targeted by AI?

Posted: 26 Jun 2012, 20:39
by zerosum
Howdy,

Is there a particular set of rules (other than proximity) regarding how / why the AI "decide" to target an unit?

Also, can such target be changed during a fight (and if so, why?), or remain targeted until destroyed?

Re: How player's units get targeted by AI?

Posted: 27 Jun 2012, 09:23
by iap
Good question. I was wondering it myself.

Re: How player's units get targeted by AI?

Posted: 27 Jun 2012, 23:37
by Per
Units follow a rather complicated set of rules for where to shoot by default.

Re: How player's units get targeted by AI?

Posted: 28 Jun 2012, 01:57
by Iluvalar
Simpy put :
*Visibility
*Range
*Actual damage
*Possibility to help another ally
*Weapon modifier
*Unit type (shoot commander and repair first)

But there is more, that code look scary...

Re: How player's units get targeted by AI?

Posted: 28 Jun 2012, 06:30
by Stratadrake
What about defensive structures?

Proximity targetting, after all, is the number one reason why you don't use Flamers on bunkers -- they don't live long enough to even get within range.

Re: How player's units get targeted by AI?

Posted: 28 Jun 2012, 11:28
by NoQ
the number one reason why you don't use Flamers on bunkers -- they don't live long enough to even get within range.
What? Flamer halftracks are an excellent choice against bunkers, i don't know what you are talking about.

Re: How player's units get targeted by AI?

Posted: 29 Jun 2012, 06:42
by Stratadrake
I know Flamers do triple damage to bunkers. It's all the other defenses (mostly hardpoints) in the vinicity that cause the problems - while the rest of the assault group is sitting back wailing away at hardpoints with cannon fire and rockets, the flamers take one step forward to get within range and next thing I know, "Unit Lost!" :(

Re: How player's units get targeted by AI?

Posted: 01 Jul 2012, 20:16
by zerosum
Per wrote:Units follow a rather complicated set of rules for where to shoot by default.
Definitely. I even failed to figure whether randomness was involved. Maybe it is, though.
Iluvalar wrote:Simpy put :
*Visibility
*Range
*Actual damage
*Possibility to help another ally
*Weapon modifier
*Unit type (shoot commander and repair first)
Makes sense. However, I was wondering if the occurence of such parameters had an influence over the decision tree, because many times the same stage displays different behaviors. It is extremely hard to predict (maybe that was intended after all) the AI.
Iluvalar wrote:But there is more, that code look scary...
I''m sure it is. :(

Re: How player's units get targeted by AI?

Posted: 01 Jul 2012, 22:51
by Iluvalar
Most of the AIs decisions are deterministic.

However they scout randomly and then they base their decision of that partial information. As a result, they always react differently even if you are in the same map using the same strategy.