QUOTE(Deus Ex Machina @ Jun 5 2005, 01:30 AM)
We'd probably be more successful in the long run if we started by perfecting a few simple components (target aquisition, single movement and targeting schemes, etc), and move on to integrating a complete learning system into the components.
Yeah, we can do learning later, if at all.
Linear Targeting: I found an algorithim that should work, for shot power 1.
Solving the law of cosines for the angle yields:
Angle to Turn gun = ArcSin(((v^2)-d^2-17))/(2*d*17))
v is the velocity of the target, d is initial distance to the target. The 17 comes from the speed of the shot.
Note: In robocode, the unit circle opens clockwise: All sins should be replaced with cosines, and cosines with sines in your calculations. The above formula is already replaced.