Category:Movement

From Robowiki
Revision as of 21:55, 1 April 2011 by Voidious (talk | contribs) (flesh this out a bit)
Jump to navigation Jump to search

In Robocode, you deplete your opponent's energy and increase your own energy by hitting other bots with bullets. Thus, coming up with movement algorithms to keep enemies from hitting you is a cornerstone of a successful Robocode bot. Different algorithms are more appropriate for different CodeSize divisions and styles of play.

Melee and 1v1 are the most explored Robocode rule sets, so most movement algorithms could be categorized as most appropriate for one of them. Other rule sets, like Teams, Twin Duel, Droids, and Virtual Combat add various other elements and borrow from Melee and 1v1 movement styles.

In Melee, besides moving unpredictably, it's also very important to choose a stategically beneficial location. For instance, not being closest to any other bot means that you will likely not be targeted by other bots - this allows you to easily collect survival points and also rack up bullet damage against bots that may not be perpendicular to you, making them easier targets. Corners tend to be coveted positions in a Melee battle. You cannot scan the entire battle field every tick in Melee, and Robocode's bullet hit events only fire for bullets that you fire or that hit you, so you have access to a far lower percentage of the total information in the battle. This makes it difficult or impossible to employ precise forms of bullet dodging in Melee.

In 1v1, a primary differentiator of movements at the highest level is bullet dodging. There are still strategic choices, like distancing, attack angle control, dive protection, and staying out of corners (which can limit your Maximum Escape Angle). But distancing is reciprocal, most decent attack angle control schemes perform similarly, and the benefit of staying far away may offset the negative impact of being cornered. Between gathering scans of the enemy every tick and receiving bullet hit events for every bullet that hits you or the enemy, you have a very high amount of information about the battle. About the only thing you are unaware of is the location of enemy bullets that don't (or haven't yet) hit you. Wave Surfing movements with Precise Prediction put all of this together to dodge bullets with surprising accuracy, especially against simple targeters.

For 1v1 in lower weight classes, like MicroBots and NanoBots, there is not enough room to track all of the data needed for Wave Surfing. Still, Stop And Go movements do a great job of dodging simple targeters like Head-On Targeting, and well tuned Random Movement can make your movement fairly unpredictable even to powerful guns by creating a flat movement profile.