[Home]History of WallSmoothing/Introduction

Robo Home | Changes | Preferences | AllPages


Revision 4 . . (edit) July 15, 2006 12:17 EST by David Alves
Revision 1 . . July 15, 2006 12:12 EST by David Alves [Added this page]
  

Difference (from prior major revision) (minor diff)

Changed: 7c7,16
Now we've been driving around our enemy clockwise for a bit more time, and we're starting to approach a wall. The end of the black field is the side of the battlefield. The gray line represents the closest we can get to that wall, which is 18 units. Since we can't drive directly perpendicular to our opponent for 150 units any more, we choose a "smoothed" point which is closer to the enemy. In other words, we choose the intersection of the grey line and our 150 unit dark blue circle.
Now we've been driving around our enemy clockwise for a bit more time, and we're starting to approach a wall. The end of the black field is the side of the battlefield. The gray line represents the closest we can get to that wall, which is 18 units. Since we can't drive directly perpendicular to our opponent for 150 units any more, we choose a "smoothed" point which is closer to the enemy. In other words, we choose the intersection of the grey line and our 150 unit dark blue circle. The advantages of doing this are

# We don't hit any walls.
# We can still drive clockwise or counterclockwise, so we're less predictable (and therefore harder to shoot) than if we always just reversed direction when we came near a wall.

http://davidalves.net/robocode/images/wallsmooth6.png

If we keep driving clockwise, the "smoothing angle" will get steeper and steeper, meaning that we are driving more towards our enemy instead of perpendicular.

That's it! Now you're WallSmoothing! --David Alves

Robo Home | Changes | Preferences | AllPages
Search: