Tuesday, September 15, 2009

Robocode Sample Strategies Reviewed

After creating our own movements and reviewing other people's implementation, it was a nice change of pace to review the sample robots the contributors of Robocode have created. I got an insight to some simple strategies for creating the best robot. Studying their implementation have shown me different methods I would have not known or use otherwise. This have helped me plan a strategy for the upcoming Robocode competition.

Review Tasks:
  • Movement: How does the robot move? Does it have an avoidance or following strategy?
  • Targeting: How does it find a target to fire?
  • Firing: What is its criteria for firing?
Wall
Movement: This robot moves around the perimeter of the wall in a clockwise manner. It does this by turning left and by going ahead to the wall it is facing. It has an avoiding strategy which moves the robot back if the enemy who shot it is in front and ahead if it's behind.
Targeting:
Its targeting mechanism is very basic that it uses the game's call to scan which does it automatically whenever the robot moves or turns its body/gun/radar.
Firing:
It also has a very basic firing system where it fires at an enemy whenever it scans an enemy robot.

RamFire
Movement: This robot searches for an enemy and ram it then when it hits its enemy if fires a bullet with power that depends on the enemy's energy. It does this by relying on the enemy's bearing which in turn determines how the robot turns in which direction.It has no avoidance technique since its primary objective is ram enemies for bonus points.
Targeting:
Its targeting is dependent on how the robot moves when it changes it's direction.
Firing:
The robots firing mechanism depends on the enemy's energy points. It fires a low power bullet if the energy level is low. The robot's purpose seems to use ramming as primary technique instead of firing bullets.

SpinBot
Movement: This robot moves in a circle and fires an enemy when in range. Its avoidance strategy is its circular movement.
Targeting:
Its targeting mechanism is pretty basic, it fires whenever it scans an enemy.
Firing:
Since its targeting is basic, this robot fires a bullet with a power of 3.

Crazy

Movement: This robot's movement just like its name suggest is crazy. Its erratic behavior resembles a chicken with its head cut-off. It has a set amount of pixel movement and changes direction each turn. It changes reverses direction whenever it hits a wall or another robot and then returns to its original behavior. Its erratic behavior is its avoidance strategy and consequently does not follow any following strategy.
Targeting:
Considering its crazy moves, the targeting mechanism lacks the same extremity, it just follows the gun's heading.
Firing:
This robot does not have any criteria for firing. It just fires when an enemy is scanned.

Fire
Movement: This robot mostly sits still and only moves when it is hit. It moves back and fort whenever it gets hit each time. Its avoidance strategy is useless if not close to nothing since it only moves so that it never gets hit in the same place twice consecutively.
Targeting:
Its targeting system is basic. It relies on the gun's turning as a way to scan for enemies.
Firing:
Its firing criteria is to shoot the enemy with a high powered bullet if it's target is close and lower powered bullet when near.

SittingDuck
Movement: This robot does nothing therefore there is no avoidance or following strategy.
Targeting:
It does not find a target.
Firing:
And does not fire.

Corners
Movement: This robot moves to the top left corner and just stays there. It changes corner for the next round whenever it dies.
Targeting:
Its targeting system is average since it first checks to see if there is a robot in it's path and if there is starts it's custom firing method. It also only scans a 90 degrees radius that is adjusted depending on the corner. This however could be a potential flaw that limits the robot's firing range since it stops and fires at an enemy before it even gets to it's corner.
Firing:
This robot's firing criteria is to use a bullet power relative to the enemy target's distance.

Tracker
Movement: This robot's following strategy is to close in at a chosen target and moves within 100 pixels of that target and fires. It moves back a little if gets too close.
Targeting:
Since the robot's strategy is to follow a chosen target and gets close enough to fire, its targeting depends on the gun's turning.
Firing:
This robot doesn't have any special criteria. It mainly shoots a higher powered bullet whenever it gets close to an enemy.

Upon writing my review for each robots, I realized that the best strategy is to balance the movement, targeting, and firing methods. All three aspects have overlapping functions that when combined properly can build one of the best robots.

0 comments:

Post a Comment