Is wiki wrong about MEA?

Jump to navigation Jump to search

The thing is, if the bot moves slightly away then it increases the bullet flight time, allowing the bot to reach a higher MEA than just an orbit or chord.

Personally, in DrussGT I use a precise MEA since it gave better results. But if you have some limitation on whether the bot can exceed the calculated MEA (for example you log them to bins) then the asin is better, otherwise bots could potentially move to angles you can't shoot at.

Skilgannon (talk)12:26, 17 September 2017

Are you using precise MEA to scale? or just to cut. From the version history I think it is the latter, but Understanding DrussGT says former ;)

Xor (talk)12:46, 17 September 2017


Skilgannon (talk)15:01, 17 September 2017
I've just calculated it. If it is correct moving away helps.
            latVel = Math.sin(angle) * 8;
            advVel = -Math.cos(angle) * 8;
            timeToHit = distance / (bulletSpeed + advVel);
            mea = latVel / (distance - (timeToHit * advVel) / 2) * hitTime;
This is the formula. It thinks that the bot is moving at full speed and with brute force search I got these results:
Bullet Power 1:
LatVel: 7.762365810207972 AdvVel: -1.9353751647973414
Bullet Power 2:
LatVel: 7.6504380477042835 AdvVel: -2.338973637781894
Bullet Power 3:
LatVel: 7.468643411977614 AdvVel: -2.8669435963624013
Distance doesn't change anything if it isn't zero.
Dsekercioglu (talk)15:40, 17 September 2017

timeToHit is not taking in account that the bullet moves at some angle too, i.e. we need to use bulletSpeed*cos(MEA). In above we assume that 'a' is angle between line connecting bots and the velocity of the target.

The last line is not precisely correct as well. There should be no factor of 2, and you forgot the atan. It should be

 mea = atan( latVel / (distance - (timeToHit * advVel)) * hitTime );

But the last thing could be simplified a bit if you notice that

latVel = bulletSpeed*sin(MEA)

Moving away is always bad idea from the MEA prospective within robocode physics.

Beaming (talk)16:07, 17 September 2017

Look at the values that he posted for latVel vs advVel, all with the same 8 speed. For a very small reduction in latVel you can get a big increase in advVel. Increased advVel means you get a longer time until the bullet hits, so in that extra time you can add more latVel components, giving you a higher MEA. This is offset somewhat by being further away, so your latVel/distance is slightly smaller so each latVel increases the MEA a bit less. But this is more than compensated by the extra time until the bullet hits.

Skilgannon (talk)17:02, 17 September 2017

Aren't we confusing increase time to hit with increase EA? Longer time to hit has an advantage to decrease bot shadow, but it is not nesesary results in increase of EA.

Continuing our discussion of border cases, if bullet and bot have the same speed. The best strategy is run away from the firing bot. The bullet will never catch up, but the EA is the smallest possible here, i.e. zero.

Beaming (talk)18:06, 17 September 2017

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:Talk:Maximum Escape Angle/Is wiki wrong about MEA?/reply (11).

It is not the correct one. It just has a higher value than the real MEA all the time so it works.

Dsekercioglu (talk)11:42, 18 September 2017

No, traditional MEA is correct, as long as wave speed > robot speed.

I can prove that, but not formally.

If your speed < wave speed, you'll always be hit.

Since you'll always be hit, that's all about where you are hit.

Assume that there is one point you are hit, and that point gives you max escape angle — If you don't go there directly (by a straight line), math says you'll always have a shorter path, which gives you extra time. And you can always use that time to increase your MEA, which contradicts to "that point gives you max escape angle". Therefore MEA must be reached by moving along a straight line.

Since MEA must be reached by following a straight line — All the possible hit location forms something similar to ellipse — however I yet not proved it is an ellipse, but it looks like that, and when wave speed = 2 * robot speed, it is an exact circle (which I have a proof).

Anyway, since it looks like an ellipse, the MEA is always reached when you move perpendicular to the HOT angle.

Xor (talk)13:29, 18 September 2017

Oh' I missed that part. If you are faster than the bullet MEA can't be calculated because it keeps increasing.

Dsekercioglu (talk)15:35, 18 September 2017

No. It is always easier to go by a straight line but for example you've calculated a MEA of Pi radians. Going directly doesn't help because even if we arrived earlier than the orbital one, the wave could hit. I'll make some calculations to be sure that it is true with smaller angles too.

Dsekercioglu (talk)20:15, 18 September 2017