Robo Home | Changes | Preferences | AllPages

MaxEscapeAngle is the furthest angle an enemy can theoretically be relative to where they were when we fired. In other words, MaxEscapeAngle is the maximum angle difference during BulletTravelTime. In order to achieve the maximum angle, the enemy should orbit the attacker at full speed.

This is calculated like so:

 Math.asin(8.0 / (20.0 - 3.0 * bulletPower))
 bullet speed * bullet travel time   /  |
                                    /   |  

                      lateral velocity * bullet travel time

(Figure from LinearTargeting)

	MaxEscapeAngle	MaxEscapeAngle (degrees)
0.1 	0.418172793	23.95953613
0.2 	0.42505527	24.35387302
0.3 	0.432176489	24.76188883
0.4 	0.439549592	25.18433653
0.5 	0.447188745	25.62202775
0.6 	0.455109243	26.07583882
0.7 	0.46332763	26.54671771
0.8 	0.471861837	27.03569179
0.9 	0.480731339	27.54387678
1.0 	0.489957326	28.07248694
1.1 	0.499562917	28.62284673
1.2 	0.509573387	29.19640441
1.3 	0.520016446	29.79474763
1.4 	0.530922556	30.41962172
1.5 	0.542325303	31.07295097
1.6 	0.554261834	31.75686386
1.7 	0.566773382	32.47372274
1.8 	0.579905879	33.22615937
1.9 	0.593710703	34.01711753
2.0 	0.608245579	34.84990458
2.1 	0.623575676	35.72825446
2.2 	0.639774963	36.65640524
2.3 	0.656927894	37.63919579
2.4 	0.675131533	38.68218745
2.5 	0.694498266	39.7918195
2.6 	0.715159313	40.97561034
2.7 	0.737269359	42.24242262
2.8 	0.761012754	43.60281897
2.9 	0.786612042	45.06955012
3.0 	0.814339942	46.65824177

See also

-- Stelokim

Isn't it perpendicular, and not, as you say, 'orbiting the enemy'? Unless i misunderstand your meaning? --Starrynte

The two are same. If you are perpendicular to something, you orbit it. -- Stelokim

No, to acheive maximum escape angle, you stay perpendicular to the line through you and your enemy at the time of fire, so you continure in a straight line until the bullet would reach you, ever increasing your distance from the point of fire. However, I might just bet using maximum orbital escape angle as the basis for GF calculations would prove slightly more fruitful, if there's any mathematical difference. --Simonton


Some maths:

 Orbit: radius = 1, arc length = 1, then angle = 1 radian
 Perpendicular at the time of fire: radius = 1, perpendicular line length = 1, then angle = pi / 4 = 0.78539816339744830961566084581988

Increasing your distance does not help. Lateral distance from the time of fire does.

-- Stelokim

You have to remember that if you move away from the point of fire, the bullet is going to take longer to reach you, so you can actually travel farther than just "1" in your example. --Simonton

 Assuming bullet speed=2, tank speed=1
 Orbit: radius = 2, arc length = 1, then angle = 0.5 radian
 Perpendicular at the time of fire: radius = 2, perpendicular line length = a, bullet travel length = 2a, then angle = 0.52359877559829887307710723054658

You two are right. I was wrong. Thank you for the good information. :)

-- Stelokim

Hmm, I'm not sure where this post should go, so I'll put it here. Neways: I've thought of using mea for linear targeting like this: Calculate the mea, find the angle, and aim with that angle in the direction the enemy is going. Unless it is already being used? --Starrynte

That's true..Would anyone mind checking my pseudocode on the LinearTargeting page? It is a bit messy, but...(I fixed the full speed 'problem') --Starrynte Nvm about trying this, enemy might not travel perpendicular to my bot...I can (and am) making a bot that draws the max escape angle on the battlefield... --Starrynte

Has anybody ever tried using PrecisePrediction to calculate the MEA for their surfing? I know Dookious and Garm use it for their gun, but right now I'm hooked on movement =). The reason I'm asking is because I just gave it a try, and it really hurt my score against everybody from Dookious to Raiko to FloodMini... so I'm not sure if it's a bug, or just a bad idea =) -- Skilgannon

I don't unse PrecisePrediction in the gun any more, it was too slow (and not bugfree). But it is on my todo-list to test my MEA approximation (currently used in the gun) also for surfing. I'll do a quick hack, lets see if it works. --Krabb

I have also tried it for surfing and found it to perform worse. (My logic is that your surf stats are to simulate the enemy's gun and 99% of bots don't use precise max escape angles in their guns.) If you are curious, you could very easily flip Dookious to use precise escape angles in the movement - there are constants for "traditional" or "precise" max escape angles in the Wave class, so just switch which one's used in DookiCape?. -- Voidious

I tried this in Horizon briefly. Very briefly. I had the same performance results and rationalization as Voidious. -- AaronR

I'm not using it because it would throw of how precisely I predict simple linear targeting. Or ... I guess that depends on whether you're taking walls into account ... -- Simonton

Yeah, I thought it might be something like that. But Dookious uses precise angles in the gun, and it didn't help against him, so there must be something else as well. I don't have any wall segmentation in my movement...so that isn't screwing stuff up. While I'm at it, does wall segmentation help in movement? Both reverse and forward, or just forward, or what? And what kind of slices? -- Skilgannon

I think maybe one reason precise MEA helps in the gun is that you won't ever be shooting out of bounds, but that will never be an issue in WaveSurfing with precise prediction anyway. I would say yes, you should try some wall segmentation, forward and reverse. If you are viewing it as the "wall distance" is the GF you'll be at if/when you hit the wall, I'd start with slices of .25 / .5 / .75 or .3 / .65, with equal or more forward segments than reverse. I'm sure you'll want to experiment with that, but it's a start. =) -- Voidious

I implemented the MEA calculation from the gun in my movement. It is better vs. some bots and worse vs other. Especially a combination of traditional normalised buffers and precise MAE buffers gives good results! --Krabb

How about segmenting your movement on the MEA? That should work for the bots that it helps against, but if you have it buffered in parallel with a buffer without this segmentation, it won't affect you against the bots it doesn't help against. -- Skilgannon

I'm getting drammatically better results after changing from Math.atan( 8 / v ) to Math.asin( 8 / v ). Doh. -- Martin

Hehe, yeah, before you would have had trouble hitting Walls, huh? I take it we'll be seeing a new version of Ugluk soon? -- Skilgannon

Heh... interesting. I was using Math.atan too for some reason. Math.asin but somewhere I referenced used atan...... Maybe this will help alot... I wonder where I saw atan before -- Rednaxela

Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited February 6, 2008 21:34 EST by Martin Alan Pedersen (diff)