Wednesday, September 16, 2009

Sample Robot Strategy Analysis

The Robocode program is packaged with various sample robots. Below are a few list of sample robots with its battle strategy.


Walls

Movement: This robot simply moves along the wall clockwise. It does not have any avoidance or following strategy to speak of, but it seems quite effective when faced with more than 2 robots. The only time the robot moves away from the wall is when it hits another robot along the wall, in which case, it attempts to move to the wall directly across the battlefield and continue its maneuver.

Targeting: Its targeting system is also very simple as it never moves its radar while targeting. It finds a target by pointing its gun towards the battlefield while moving along the wall.

Firing: It only fires when the radar detects the enemy. It never rotates the gun or the radar to scan/lock on to a target.

RamFire

Movement: Rotates until it detects a target, and moves directly towards it. It does not have any avoidance strategy, but its following strategy is to move directly onto the position of a target.

Targeting: It finds its target initially by rotating clockwise. Once it loses the target, it randomly rotates clockwise or counter-clockwise to continuously search for targets.

Firing: It fires only when the robot hits a target. It attempts to maximize the damage by continuously moving (ramming) into the target and by firing with the maximum fire power.

SpinBot

Movement: This robot's avoidance strategy is to move in a very tight circle. It does not have a following strategy.

Target: It finds a target simply by scanning while moving around in a circle.

Firing: Fires only when it detects an enemy with the maximum firepower.

Crazy

Movement: Its avoidance movement is to move in series of half circles and reversing direction when hitting a wall. It does not have any following strategy.

Target: It finds its target by scanning while moving in a series of half circles.

Firing: It attempts to hit the enemy as accurately as possible by using the lowest file power.


Fire

Movement: No movement.

Target: Scans for enemy by rotating its gun clockwise. Keeps the gun towards the target so long as the target does not move out of sight. It continues to scan once it loses its target.

Firing: Fires continuously until the target is destroyed with the minimum fire power.

Sitting Duck

Movement: No movement.

Target: No targeting.

Firing: No Firing. I am guessing its strategy is to sit and wait until everybody else is destroyed or disabled.

Corners

Movement: Moves to upper-left corner as soon as the battle begins, and sits there for the duration of the battle. It has no following strategy.

Targeting: It scans targets through a series of clockwise and counter-clockwise scannings.

Firing: Fires continuously until the target is destroyed.

Tracker

Movement: Moves towards the enemy and holds about 100 pixels away from the target. It has no avoidance strategy.

Targeting: Very similar to ramfire, except this robot rotates its radar to scan for targets. Once the robot loses its target it attempts to re-acquire the target by briefly scanning left and right.

Fire: Attempts to maximize the damage by firing with maximum power. Fires until the target is destroyed.

No comments:

Post a Comment