Guaranteed Hit?

Jump to navigation Jump to search

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:Polylunar/Guaranteed Hit?/reply (4).

a distance less than 36 is impossible in robocode, but a correct formula should give correct result in this case. So I prefer the atan approach.

asin approach is incorrect by geometry as well.

however trigs are always expensive, so using 18 / distance is acceptable since it gives similar result.

Xor (talk)17:30, 24 July 2018

I haven't checked it in Java but asin(positive infinity) results in positive infinity which is true for the bot width formula if we assume that the bullet starts from the robot location. The same case also happens with Traditional MEA when bullet speed is 0.

Dsekercioglu (talk)17:51, 24 July 2018

Wrong. Infinity means nothing in radians. Valid values are 0~2pi or -pi~pi or so.

An angle should never be infinty radians.

Xor (talk)17:55, 24 July 2018

If it means nothing can't we assume that the traditional formula is completely wrong since with a bullet velocity of 0, it will return positive infinity.

Dsekercioglu (talk)18:02, 24 July 2018

Bullet velocity = 0 is another geometrical situation. But in this case, distance < 36 should still fit in to your image. Or, it must be wrong.l

Xor (talk)15:00, 25 July 2018