Difference between revisions of "Angular Targeting/Factored"
Jump to navigation
Jump to search
(Marked For Cleanup) |
m (remove Angular Targeting category) |
||
Line 25: | Line 25: | ||
[[Category:Advanced Targeting Strategies]] | [[Category:Advanced Targeting Strategies]] | ||
− | |||
[[Category:Statistical Targeting]] | [[Category:Statistical Targeting]] |
Latest revision as of 23:00, 6 September 2011
This article may require cleanup to meet RoboWiki's quality standards. Please improve this article if you can.
|
A form of statistical targeting that tries to find a factor that correlates the most recent angular velocity to an accurate firing angle. This method was designed by PEZ and first used in Gouldingi. It takes ideas from both Averaged Bearing Offset Targeting and GuessFactor Targeting.
Pseudocode
This is the original description of the method, posted by PEZ:
- Multiply the bearing delta
bd
between two consecutive scans by some factorF
. - Fire a bullet and register an event which keeps information about:
- old enemy location
oel
- old robot location
orl
- time of fire
tof
- bullet speed
bs
- bearing delta
bd
- old enemy location
- In the
test()
method of this event, check for when the bullet's distance traveled (bs * (getTime() - tof)
) is greater than or equal to the distance from the current enemy location toorl
(i.e., when the bullet would have hit the enemy, if fired at the right angle). When it is:- Take the difference in bearing between
orl
->oel
andorl
-> current enemy location. Let's call this bearing deltaBD
. - Calculate the factor
f
that would have been needed to hit the enemy usingbd
(BD/bd
). - Update
F
so thatf
becomes "part of" it (for instance, using a rolling average). - Deregister the event.
- Take the difference in bearing between