Difference between revisions of "Angular Targeting/Factored"

From Robowiki
Jump to navigation Jump to search
(adding category "Targeting")
m (angular velocity, not lateral velocity)
Line 1: Line 1:
A form of [[statistical targeting]] that tries to find a factor that correlates the most recent [[lateral velocity]] to an accurate firing angle. This method was designed by [[PEZ]] and first used in [[Gouldingi]]. It takes ideas from both [[Average Bearing Offset Targeting]] and [[GuessFactor Targeting (traditional)|GuessFactor Targeting]].
+
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 [[Average Bearing Offset Targeting]] and [[GuessFactor Targeting (traditional)|GuessFactor Targeting]].
  
 
== Pseudocode ==
 
== Pseudocode ==

Revision as of 16:03, 13 November 2007

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 Average 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 factor F.
  • 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
  • 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 to orl (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 and orl -> current enemy location. Let's call this bearing delta BD.
    • Calculate the factor f that would have been needed to hit the enemy using bd (BD/bd).
    • Update F so that f becomes "part of" it (for instance, using a rolling average).
    • Deregister the event.

See also