Targeting Algorithm Overview
I've been reviewing my understanding of targeting algorithms and sometimes the best way to make them sink home is to write them out .. so here's me writing (some of) them out in my own way.
Predictive targeting assumes that an opponent's position will change in a consistent fashion every tick until your bullet can hit it, and aims for that point of impact.
- Perceptive: (only requires data from the most recent scan)
- Position only (HeadOnTargeting)
- Position changed by present velocity (LinearTargeting)
- Position changed by present heading and a fixed distance forward or backward (counter to stop-n-go movement)
- Position changed by the opposite of the present velocity and/or present heading (Head Fake Targeting)
- Historical: (requires data from one or more prior scans)
- Position changed by present velocity, present heading, and the rate of change of heading (CircularTargeting) (moved from 'Perceptive' due to Viodious's observation)
- Position changed by a fraction of the present velocity
- Position changed by average velocity over time
- Position changed by average change in position over time (Mean Targeting)
- Synergistic: (requires you to predict your future movements)
- Position changed by an oscillating velocity and heading tangental to your own (counter to tangental oscillation movement)
- Position changed by your velocity and your heading (counter to mirror movement)
- Pattern Matching:
- Position changed by historical change in velocity and historical change in heading
Random targeting assumes that shots fired in any direction will hit some of the time out of blind luck.
- Perceptive: (requires knowledge of an enemy's position)
- Aims at a random heading within a range limited by the positions that an enemy can actually move to before the bullet arrives
- Blind: (requires no data)
Bearing Offset / Conditional
Bearing offset targeting looks at the difference between the firing position's bearing to the opponent and the bearing to the opponent when a bullet could have hit it. The results are typically tallied into buckets based on the conditions known at the time of firing (see Segmentation). The premise is that an opponent in a similar situation will most likely be hit by a bullet fired at the angle that has most commonly worked in the past.