Corner Movement
Origins
Corner Movement was documented by Kyle Huntington (Kawigi) after watching SandboxLump's plain corner-seeking beat far more sophisticated opponents. He built Lib, the most complex Corner Movement ever packed into a NanoBot. The Sample Bot Corners ships a primitive version, and the RoboWiki community refined the idea further.
A crowded middle of the battlefield means more bots close enough to hit, and more bullets crossing paths with a bot that has nowhere to hide from any of them. RoboWiki's observation: fewer bots survive near the walls, because fewer bots bother to fight there. Corner Movement just drives to the nearest corner and stays.
Two walls cut the exposure to a quarter
A bot in open battlefield can take fire from a full circle around it. Tuck the same bot into a corner and two walls now block most of that circle, leaving only the roughly quarter-turn wedge of open battlefield between them for an enemy to approach or shoot from. Fewer approach angles mean fewer bots can line up a shot at once, which is the whole advantage RoboWiki credits to the technique.
Two walls block most of the directions an enemy could fire from, shrinking a full circle of exposure to one open wedge.
A destination, not a new engine
Corner Movement is less a targeting-proof algorithm and more a place to stand, so bots reach it through the movement systems already covered. Anti-Gravity Movement can pull a bot toward a chosen corner by giving that corner a negative, attractive strength in the same force sum used for enemies and walls. Minimum Risk Movement can fold corner distance into its risk score, or bias its point generator to propose corner-adjacent candidates alongside the usual ones. The Sample Bot Corners skips both and drives straight there.
nearestCorner = corner of the four battlefield corners closest to currentPosition
driveTo(nearestCorner, safetyMargin)
while alive:
patrol a short pattern inside the corner (oscillate, small orbit, or stay put)
if a wall or enemy forces a move, re-evaluate the nearest safe cornerA more developed corner mover can layer scoring on top of that skeleton, weighing which corner is genuinely least crowded rather than assuming the nearest one always is.
Name the cost
The technique "tends to work better against the best melee bots than against mediocre ones," per RoboWiki, which makes a dedicated corner mover a specialist rather than a generalist. It has nothing to offer in one-on-one, where there is no crowd to avoid in the first place. A bot parked in a known spot is also easier to target once an opponent learns to check that spot first, and if every bot in the match reaches for corners, the least crowded one stops being guaranteed.
Platform notes
Battlefield corners come from the same width and height query on both platforms, and the technique adds no platform-specific rule of its own. Convert the corner's bearing into the platform's angle convention before steering toward it, since classic Robocode headings are compass-style while Tank Royale headings are mathematical.
Further Reading
- Corner Movement - RoboWiki (classic Robocode)
- Anti-Gravity Movement - RoboWiki (classic Robocode)
- Minimum Risk Movement - RoboWiki (classic Robocode)
- Physics - Tank Royale documentation