[Home]History of GuessFactor

Robo Home | Changes | Preferences | AllPages


Revision 62 . . January 22, 2007 0:02 EST by Kawigi
Revision 61 . . January 21, 2007 23:14 EST by Chase-san [Oh, i'm dumb]
  

Difference (from prior major revision) (no other diffs)

Changed: 142c142,150
Oh, I see what you mean, i'm rather thick huh. Then what makes up for the wierd 1.1 multiplier that many use? --Chase-san
Oh, I see what you mean, i'm rather thick huh. Then what makes up for the wierd 1.1 multiplier that many use? --Chase-san

A combination of bad data collection and the discreteness of Robocode (i.e. - the fact you move by 8 at a time :-)

The proof that it really is asin(8/speed) comes from the same ideas as the "geometric" linear targeting formula. That comes out to look like this:

asin(sin(enemyHeading - absBearing) * 8 / bulletVelocity))

I'd explain that, but a search on the wiki for "law of sines" will probably turn up an answer. Finding the max escape angle has to do with maximizing this value. The asin function is increasing between -90 degrees and 90 degrees (and as long as we can't outrun bullets, we will be in that range), so we really want to maximize the sin(enemyHeading-absBearing) expression. Sines will never be more than 1 (which they are at 90 degrees, by the way), so the entire expression will never be more than asin(8/bulletVelocity) :-) -- Kawigi

Robo Home | Changes | Preferences | AllPages
Search: